c#程序集,朋友程序集 [英] c# assembly, friend assembly
本文介绍了c#程序集,朋友程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
C#内部访问修饰符的定义是internal:只能在包含程序集或友元程序集内访问.所以我的问题是什么是 c# 程序集?在包含程序集或朋友程序集内是什么意思?是指在同一个命名空间或项目中吗?
The definition for C# internal access modifier is internal: Accessible only within containing assembly or friend assemblies. So my question is what is c# assembly? what does it mean to be within containing assembly or friend assemblies? Does it mean within same namespace or project?
推荐答案
程序集(通常)是单个 .dll
或 .exe
文件.
C# 项目(通常)编译为单个程序集.
An assembly is (in general) a single .dll
or .exe
file.
A C# project (in general) compiles to a single assembly.
您可以使用 [assembly: InternalsVisibleTo(...)]
属性标记友元程序集.
You can mark a friend assembly using the [assembly: InternalsVisibleTo(...)]
attribute.
这篇关于c#程序集,朋友程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文