Created
August 20, 2013 17:41
-
-
Save wwahammy/6284692 to your computer and use it in GitHub Desktop.
My C# annoyance of the day
This file contains hidden or 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
public void SomeMethod(){ | |
if (SomeCondition()) | |
{ | |
string name = "something"; | |
//use name here | |
} | |
string name = "something else" //COMPILER ERROR: name is already declared in this scope... BUT it's not!!! | |
} | |
//Yes I know why the compiler thinks it is and it's correct BUT it's still annoying |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment