Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.