[英]How can I create an internal class with CodeDom using CodeTypeDeclaration?
How can I create an internal class with CodeDom using CodeTypeDeclaration? 如何使用CodeTypeDeclaration使用CodeDom创建内部类?
Trying this example makes it private. 尝试此示例将其设为私有。
LE: Found the answer, so I'll post it here if someone needs it. LE:找到了答案,所以如果有人需要,我会在这里发布。
myType.TypeAttributes = (myType.TypeAttributes & ~TypeAttributes.VisibilityMask) | TypeAttributes.NestedAssembly;
找到了答案,所以如果有人需要,我会在这里发布。
myType.TypeAttributes = (myType.TypeAttributes & ~TypeAttributes.VisibilityMask) | TypeAttributes.NestedAssembly;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.