-
-
Save DavidKarlas/f37b958ac77b1d22aa7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace cp765432 | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
Method1(null); | |
}//5. But ends here | |
static void Method1(BaseClass arg) | |
{ | |
//1. Breakpoint on line below | |
if (arg is Class1 ||//2. Step over on this works correctly and gets to next IF(notice only 3 checks) | |
arg is Class2 || | |
arg is Class3) | |
Console.WriteLine("3"); | |
if (arg is Class1 ||//3. Step over on this doesn't work correctly and gets out of this method(notice 4 checks) | |
arg is Class2 || | |
arg is Class3 || | |
arg is Class4) | |
Console.WriteLine("4"); | |
Console.WriteLine("5");//4. Step over IF above should end here | |
} | |
class BaseClass | |
{ | |
} | |
class Class1 : BaseClass | |
{ | |
} | |
class Class2 : BaseClass | |
{ | |
} | |
class Class3 : BaseClass | |
{ | |
} | |
class Class4 : BaseClass | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment