To use a Type within a generic method initialization, it can be accomplished with:
MethodInfo method = typeof(NameOfClass).GetMethod("MethodName", BindingFlags.Public | BindingFlags.Static);
method = method.MakeGenericMethod(type);
string results = (string)method.Invoke(null, new object[] { props[key] });
No comments:
Post a Comment