Skip to content

Instantly share code, notes, and snippets.

@LoganBarnett
Created April 8, 2011 17:47
Show Gist options
  • Save LoganBarnett/910358 to your computer and use it in GitHub Desktop.
Save LoganBarnett/910358 to your computer and use it in GitHub Desktop.
Find the compiler error
void SomeMethod() {
try {
var foo = DoSomethingThatMightBreak();
} catch {
// handle
}
var foo = "asdf";
}
@aaronino
Copy link

aaronino commented Apr 8, 2011

foo is a reserved keyword, used like so

int i = foo;
i = i*-1;
Console.WriteLine(i.ToString());

Output:
-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment