public static Invoke ( MethodInfo info, object item ) : object | ||
info | MethodInfo | |
item | object | |
리턴 | object |
public static object Parse(Type type, string value) { try { return(Enum.Parse(type, value)); } catch { var itemType = (typeof(EnumItem <>)).MakeGenericType(type); return(EmitInvoker.Invoke(itemType, nameof(Parse), null, value)); } }