Skip to content

Instantly share code, notes, and snippets.

@tugberkugurlu
Forked from darkiri/gist:2039990
Created March 14, 2012 22:43
Show Gist options
  • Save tugberkugurlu/2040145 to your computer and use it in GitHub Desktop.
Save tugberkugurlu/2040145 to your computer and use it in GitHub Desktop.
is there a method which returns all .net base types/structs that System.Convert is able to convert to/from?
typeof (Convert)
.GetMethods(BindingFlags.Static|BindingFlags.Public)
.Where(m=>m.Name.StartsWith("To"))
.Select(m=>m.GetParameters().First().ParameterType)
.Distinct()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment