Click here to Skip to main content
16,017,297 members
Home / Discussions / C#
   

C#

 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
OriginalGriff10-Aug-20 19:36
mveOriginalGriff10-Aug-20 19:36 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
Richard Deeming10-Aug-20 21:47
mveRichard Deeming10-Aug-20 21:47 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
OriginalGriff10-Aug-20 21:54
mveOriginalGriff10-Aug-20 21:54 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
Jörgen Andersson12-Aug-20 9:17
professionalJörgen Andersson12-Aug-20 9:17 
QuestionNeed to add a new visual studio solution to an existing visual studio solution Git repository Pin
syedripon6-Aug-20 6:43
syedripon6-Aug-20 6:43 
AnswerRe: Need to add a new visual studio solution to an existing visual studio solution Git repository Pin
Dave Kreskowiak6-Aug-20 7:05
mveDave Kreskowiak6-Aug-20 7:05 
AnswerRe: Need to add a new visual studio solution to an existing visual studio solution Git repository Pin
OriginalGriff6-Aug-20 7:58
mveOriginalGriff6-Aug-20 7:58 
QuestionI need to see if a digit from a number is odd or even in c# Pin
keeponfalling125-Aug-20 4:24
keeponfalling125-Aug-20 4:24 
Hello all, 

If you can please help me, I'm new to see sharp programming.

I need to display odd/even for each digit from a number like this:

4444
even
even
even
even

So, I extract each digit from the right - to the left (it was easy for me like this) and I have this code:

 <pre>
static void Main(string[] args)
{

string inputData = Console.ReadLine(); // the digit
int number = Convert.ToInt32(inputData);

int aDigit = number % 10000 / 1000;
int bDigit = (number % 1000) / 100;
int cDigit = (number % 10);
int dDigit = (number % 100) / 10;
}
<pre lang="c#">


To get odd/even from each digit I use the concatenate method, and combine each digit with the string name odd/even and in console I get eveneveneveneven (for 4444). Is there a way to get like a block or list with concatenate method.

Or is there with if/else function and display the odd/even result with if (aDigit %2 ==0). and return in console writeline even/odd like a list.

Thank you for your time.


AnswerRe: I need to see if a digit from a number is odd or even in c# Pin
OriginalGriff5-Aug-20 4:58
mveOriginalGriff5-Aug-20 4:58 
GeneralRe: I need to see if a digit from a number is odd or even in c# Pin
keeponfalling125-Aug-20 5:23
keeponfalling125-Aug-20 5:23 
GeneralRe: I need to see if a digit from a number is odd or even in c# Pin
OriginalGriff5-Aug-20 5:45
mveOriginalGriff5-Aug-20 5:45 
AnswerRe: I need to see if a digit from a number is odd or even in c# Pin
Gerry Schmitz5-Aug-20 5:35
mveGerry Schmitz5-Aug-20 5:35 
GeneralRe: I need to see if a digit from a number is odd or even in c# Pin
keeponfalling125-Aug-20 10:19
keeponfalling125-Aug-20 10:19 
GeneralRe: I need to see if a digit from a number is odd or even in c# Pin
Gerry Schmitz5-Aug-20 14:06
mveGerry Schmitz5-Aug-20 14:06 
QuestionHow to get ios device capacity using MDM profiling Pin
Veridic Anil4-Aug-20 22:25
Veridic Anil4-Aug-20 22:25 
AnswerRe: How to get ios device capacity using MDM profiling Pin
Gerry Schmitz5-Aug-20 5:58
mveGerry Schmitz5-Aug-20 5:58 
QuestionDataBase in User Control Pin
Ismael_19994-Aug-20 4:15
Ismael_19994-Aug-20 4:15 
AnswerRe: DataBase in User Control Pin
OriginalGriff4-Aug-20 4:32
mveOriginalGriff4-Aug-20 4:32 
GeneralRe: DataBase in User Control Pin
Gerry Schmitz4-Aug-20 6:12
mveGerry Schmitz4-Aug-20 6:12 
GeneralRe: DataBase in User Control Pin
OriginalGriff4-Aug-20 6:26
mveOriginalGriff4-Aug-20 6:26 
QuestionHow can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w31-Jul-20 2:38
arnold_w31-Jul-20 2:38 
AnswerRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Eddy Vluggen31-Jul-20 2:53
professionalEddy Vluggen31-Jul-20 2:53 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w31-Jul-20 4:03
arnold_w31-Jul-20 4:03 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard MacCutchan31-Jul-20 4:49
mveRichard MacCutchan31-Jul-20 4:49 
AnswerRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w31-Jul-20 11:03
arnold_w31-Jul-20 11:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.