How do links and namespaces work?

I am currently developing a Windows .NET service and am interested in how links and namespaces work at a high level. I come from the C ++ background, and only statements like #include <...> etc. are familiar to me. Thanks for clarifying.

+3
source share
2 answers

A link is just a way to tell the compiler to look in the reference assembly for types when trying to resolve them.

Now namespaces are not tied to assemblies. Namespaces are a logical construct, and assemblies are a physical construct.

This is why you see classes in .NET from the System namespace in the files mscorlib.dll, System.dll, System.Core.dll, etc. etc.

, , .

( , ), .

, ( ), , , .

+3

(, System.Text) #includes, , .

- ; , Xml System.Xml.

0

Source: https://habr.com/ru/post/1733405/


All Articles