C# : Proper "if - elseif" formatting
I frequently run into the following problem, I was wondering if there is any better way to deal with it:

    if (A || B)
    {
        //Start stuff if either A or B is true. Then:
    
        if (A && B)
            //DoSomething
        else if (A && !B)
            //DoSomething
        else if (B && !A)
            //DoSomething
    }

I'm asking because the if-elseif-elseif eventually looks like a big mess to read through, when the comments are replaced by code. Not even talking about what to do when theres a C involved. Any help is welcome~
C# : Proper "if - elseif" formatting
===

I frequently run into the following problem, I was wondering if there is any better way to deal with it:

    if (A || B)
    {
        //Start stuff if either A or B is true. Then:
    
        if (A && B)
            //DoSomething
        else if (A && !B)
            //DoSomething
        else if (B && !A)
            //DoSomething
    }

I'm asking because the if-elseif-elseif eventually looks like a big mess to read through, when the comments are replaced by code. Not even talking about what to do when theres a C involved. Any help is welcome~