-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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