Skip to content

Instantly share code, notes, and snippets.

@iguigova
iguigova / gist:1182841
Created August 31, 2011 04:50
Invoking a Generic Method With Parameters using Reflection
private Dictionary<string, Type> typeCache = new Dictionary<string, Type>();
public bool TryFindType(string typeName, out Type t)
{
lock (typeCache)
{
if (!typeCache.TryGetValue(typeName, out t))
{
t = Type.GetType(typeName);
if (t == null)