Search⌘ K
AI Features

Working with Namespaces and Types

Explore the relationship between .NET assemblies and namespaces, understand how NuGet packages distribute assemblies, and learn to import namespaces in C# to use types correctly. This lesson helps you manage dependencies and organize your code effectively within .NET projects.

In the world of .NET development, understanding assemblies and namespaces is fundamental. Common .NET types reside within assemblies, but the relationship between assemblies and namespaces can be complex. This complexity becomes evident as we explore the associations between assemblies and namespaces, shedding light on the intricate architecture of the .NET framework.

Namespaces and types in assemblies

Many common .NET types are in the System.Runtime.dll assembly. There is not always a one-to-one mapping between assemblies and namespaces. A single assembly can contain many namespaces, and a namespace can be defined in many assemblies. We can see the relationship between some assemblies and the namespaces ...