Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a private assembly in .Net?

I understand access modifiers at the class level and below, but why would an entire assembly be private? I assume by default, assemblies are public?

like image 544
user18931 Avatar asked Dec 31 '22 09:12

user18931


1 Answers

Well, in the context of assemblies, private means the assembly cannot be referenced by another application outside the directory it's contained in. Therefore, private to the application it's being used for.

As for your question about the default being public....someone correct me if I'm wrong, but there is no public. It would be shared. A shared assembly can obviously be referenced by multiple applications and must reside in the GAC. All the rules of the GAC would then apply.

like image 84
Kilhoffer Avatar answered Jan 12 '23 20:01

Kilhoffer