如何使用 CodeTypeDeclaration 使用 CodeDom 创建内部类?



如何使用 CodeTypeDeclaration 使用 CodeDom 创建内部类?

尝试此示例会使其私有。

LE:找到了答案,所以如果有人需要,我会在这里发布。

myType.TypeAttributes = (myType.TypeAttributes & ~TypeAttributes.VisibilityMask) | TypeAttributes.NestedAssembly;

找到了答案,所以如果有人需要,我会在这里发布它。

myType.TypeAttributes = (myType.TypeAttributes & ~TypeAttributes.VisibilityMask) | TypeAttributes.NestedAssembly;

最新更新