惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
H
Heimdal Security Blog
S
Secure Thoughts
Help Net Security
Help Net Security
The Hacker News
The Hacker News
T
Threatpost
T
Troy Hunt's Blog
T
Threat Research - Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
WordPress大学
WordPress大学
TaoSecurity Blog
TaoSecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Cisco Talos Blog
Cisco Talos Blog
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
阮一峰的网络日志
阮一峰的网络日志
Security Latest
Security Latest
Forbes - Security
Forbes - Security
The Last Watchdog
The Last Watchdog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
C
Cybersecurity and Infrastructure Security Agency CISA
小众软件
小众软件
Microsoft Azure Blog
Microsoft Azure Blog
Google Online Security Blog
Google Online Security Blog
N
Netflix TechBlog - Medium
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
S
Securelist
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
G
GRAHAM CLULEY
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
C
Cisco Blogs
量子位
有赞技术团队
有赞技术团队
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
SegmentFault 最新的问题
T
The Exploit Database - CXSecurity.com
MyScale Blog
MyScale Blog
A
Arctic Wolf
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog

博客园 - 大坏蛋

struts 2.1配置 腾讯,你是怎么知道我机器上装了360的 程序.NET Framework版本升级,重签名,重链接,批量签名工具 .NET 平台优秀控件及源代码介绍(一) 灯神 终于轻松下来了 如何扮演另一个帐号(C#实现) .NET Remoting的新特性-IpcChannel(.NET Framework 2.0) 我的GMAIL开始使用 关于委派的返回值 .NET Remoting中的事件处理(.NET Framework 2.0) 关于MyIE2中博客园页面自动跳转的问题回答 Thread.Abort终止一个线程 今天统计了一下我们项目的代码 Friend Assembly 忘记交手机费,招商银行的自助缴费不错! 六一快到了,祝所有小朋友节日快乐 COM+连接池的问题 系统消息框居然是可以复制的
Friend Assemblies(.NET FrameWork 2.0新特性)
大坏蛋 · 2004-09-10 · via 博客园 - 大坏蛋

一个Assembly中所有的非公共类型,可以被它的【好友】Assembly访问。即如果AssemblyA中声明AssemblyB是它的好友Assembly,则AssemblyB可以像访问自身Assembly一样访问AssemblyA的私有类型。
将另一个Assembly声明成自己的Friend Assembly,需要使用一个InternalsVisibleToAttribute的特性。

[assembly:InternalsVisibleTo ("AssemblyB", PublicKeyToken="32ab4ba45e0a69a1")]

不过,声明Friend Assembly,代表允许AssemblyB访问自己的私有类型,但B不做逆向声明,A是不能访问B的私有类型的。跟现实生活一样。有的人你把他当朋友,什么秘密都告诉他,可人家没把你当朋友(开个玩笑,我身边没有)。