Click here to Skip to main content
15,796,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
Richard Deeming10-Aug-20 22:47
mveRichard Deeming10-Aug-20 22:47 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
OriginalGriff10-Aug-20 22:54
mvaOriginalGriff10-Aug-20 22:54 
GeneralRe: The provider is not compatible with the version of Oracle client Pin
Jörgen Andersson12-Aug-20 10:17
professionalJörgen Andersson12-Aug-20 10:17 
QuestionNeed to add a new visual studio solution to an existing visual studio solution Git repository Pin
syedripon6-Aug-20 7:43
syedripon6-Aug-20 7:43 
AnswerRe: Need to add a new visual studio solution to an existing visual studio solution Git repository Pin
Dave Kreskowiak6-Aug-20 8:05
mveDave Kreskowiak6-Aug-20 8:05 
AnswerRe: Need to add a new visual studio solution to an existing visual studio solution Git repository Pin
OriginalGriff6-Aug-20 8:58
mvaOriginalGriff6-Aug-20 8:58 
QuestionI need to see if a digit from a number is odd or even in c# Pin
keeponfalling125-Aug-20 5:24
keeponfalling125-Aug-20 5:24 
AnswerRe: I need to see if a digit from a number is odd or even in c# Pin
OriginalGriff5-Aug-20 5:58
mvaOriginalGriff5-Aug-20 5:58 
Try this:
C#
/// <summary>
/// Returns a string giving the odd and even status for each digit of a value
/// </summary>
/// <param name="val">Value to check</param>
/// <returns>line by line digit and status</returns>
private static string GetOddAndEvens(int val)
    {
    StringBuilder sb = new StringBuilder(120);
    Stack<int> digits = new Stack<int>();
    val = Math.Abs(val);
    while (val > 0)
        {
        int digit = val % 10;
        digits.Push(digit);
        val /= 10;
        }
    while (digits.Count > 0)
        {
        int digit = digits.Pop();
        string evenOdd = digit % 2 == 0 ? "even" : "odd";
        sb.AppendLine($"{digit} - {evenOdd}");
        }
    return sb.ToString();
    }

"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

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

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.