日期:2014-05-17 浏览次数:20873 次
private static MethodInfo GetTryParseMethod<T>()
{
var type = typeof(T);
return _tryMethodCache.GetOrAdd(type, t =>
{
var method = t.GetMethod("TryParse",
BindingFlags.Public
------解决方案--------------------
BindingFlags.Static,
null,
new[] { typeof(string), t.MakeByRefType() },
null);
return method;
});
}