Restrict access to .NET assembly?

后端 未结 2 1772
长情又很酷
长情又很酷 2020-12-29 15:34

Is there a way to have a .NET assembly accessible for only authorized sources?

I mean I want to have a DLL that contains components, but I don\'t want anyone to be a

2条回答
  •  一个人的身影
    2020-12-29 16:19

    You can create internal classes. And the give your specified assemblies to access these classes by using InternalsVisibleTo attribute.

    The assembly should be strong named. You can find more information about the attribute in this article.

提交回复
热议问题