Created
September 9, 2018 01:53
-
-
Save tluyben/5a478ec9f08d56cac0cfa0b3066fd179 to your computer and use it in GitHub Desktop.
Type.GetType(string t) without having the full name
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
foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) | |
{ | |
foreach(var _t in a.GetTypes()) | |
{ | |
if (_t.Name == t) | |
{ | |
return _t; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment