EP RScript 仍存在一些问题, 但是能够运行

This commit is contained in:
2025-10-09 18:02:00 +08:00
parent a8cfb012fc
commit f8d81d9198
14 changed files with 756 additions and 573 deletions

View File

@@ -66,7 +66,7 @@ namespace Convention
public static T ConvertValue<T>(string str)
{
Type type = typeof(T);
var parse_method = type.GetMethod("Parse");
var parse_method = type.GetMethod("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 &&