using System.Reflection;
public object GenNewClass(string Type)
{
Assembly creator = Assembly.GetExecutingAssembly();
object obj = creator.CreateInstance(Type);
return obj;
}
foreach (PacketID state in Enum.GetValues(typeof(PacketID)))
{
ts.Add(GenNewClass(state.ToString()));
}
댓글 없음:
댓글 쓰기