Skip to content

Instantly share code, notes, and snippets.

@tluyben
Created September 9, 2018 01:53
Show Gist options
  • Save tluyben/5a478ec9f08d56cac0cfa0b3066fd179 to your computer and use it in GitHub Desktop.
Save tluyben/5a478ec9f08d56cac0cfa0b3066fd179 to your computer and use it in GitHub Desktop.
Type.GetType(string t) without having the full name
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