Skip to content

Instantly share code, notes, and snippets.

@stefansedich
Created August 17, 2015 22:19
Show Gist options
  • Save stefansedich/b4519bf77fa1ed4b3740 to your computer and use it in GitHub Desktop.
Save stefansedich/b4519bf77fa1ed4b3740 to your computer and use it in GitHub Desktop.
void Main()
{
dynamic foo = 1000000000000000;
// DOES NOT WORK
var x = Convert.ToInt64(foo);
// WORKS!!!
//long x = Convert.ToInt64(foo);
x.Something();
}
static class FooExt {
public static void Something(this long l) {
l.Dump();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment