Skip to content

Instantly share code, notes, and snippets.

@alexyork
Created September 21, 2010 11:34
Show Gist options
  • Save alexyork/589549 to your computer and use it in GitHub Desktop.
Save alexyork/589549 to your computer and use it in GitHub Desktop.
Ugly.cs
// Unformatted / unindented
new Nullable<decimal>().GetValueOrDefault().GetType().GetMethod("Parse", BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof(string) }, null).Invoke(null, new object[] { "123,45" })
// Formatted / indented
new Nullable<decimal>().GetValueOrDefault()
.GetType()
.GetMethod("Parse",
BindingFlags.Static | BindingFlags.Public,
null,
new Type[] { typeof(string) },
null)
.Invoke(null, new object[] { "123,45" })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment