1
我想包括在运行时生成类型采用它自己的类型作为参数拷贝的方法 - 我敢肯定,我失去了一些东西很明显,但我看不出如何做到这一点如何在运行时构建类型的方法中引用包含类型?
TypeBuilder recordTypeBuilder =
moduleBuilder.DefineType("_" + tableSpec.Name + "Record", TypeAttributes.Sealed,);
recordTypeBuilder.DefineMethod("CopyFrom", MethodAttributes.Public, null, new[] { typeof(???) });
???是我遇到问题的地方。我还无法构造该类型,因为我还没有完成它的创建!
有什么想法?
的问候,从System.Type
你能只需将'recordTypeBuilder'呢? – 2009-09-21 16:58:52