Compare commits

...

1 Commits

Author SHA1 Message Date
9b9264a6cc 修复了ConventValue中Parse的错误 2025-10-08 21:43:14 +08:00

View File

@@ -438,7 +438,7 @@ namespace Convention
public static _T convert_xvalue<_T>([In] string str)
{
Type type = typeof(_T);
var parse_method = type.GetMethod("Parse");
var parse_method = type.GetMethod(nameof(int.Parse), BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof(string) }, null);
if (parse_method != null &&
(parse_method.ReturnType.IsSubclassOf(type) || parse_method.ReturnType == type) &&
parse_method.GetParameters().Length == 1 &&