Just reviewing some .NET stuff for an interview tomorrow,
MSDN defines the Internal
keyword as follows:
Internal types or members are accessible only within files in the same assembly
But what I cannot seem to find is the definition for an assembly. Is that everything within the same namespace, the same project, or...?
Assemblies and namespaces are orthogonal. One assembly may contain multiple namespaces and a single namespace may span multiple assemblies. Assemblies are the smallest independently versionable unit of code in the .NET framework. Assemblies define the physical organization of your code (into dll or exe files), while namespaces define the logical organization. A single assembly is a single dll or exe file. A namespace is logical grouping typically based on technology or function. System.Net
deals with networking. System.Text
deals with text manipulation and encodings.
Note that I haven't mentioned projects at all. A project is something that is only really relevant to a particular build system. The .NET runtime has no knowledge of projects, per se. Since most people use Visual Studio and MSBuild tools for development and the default is to have a single project output a single assembly, people tend to use the terms project and assembly interchangeably in casual conversation. Other tools like MonoDevelop follow a similar pattern, but there is no rule dictating that a single project must produce a single assembly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With