As a variable of the same type in C# can be assigned to another if they are not in the same branch of the inheritance?

Please tell me:
That is, in C#, that's the type XNamespace.
Inherited directly from System.Object.

At the same time this form of entry is quite legitimate:
XNamespace ds = "";

How is this possible? Because the string type is neither parent nor child to XNamespace, but this one is different.
June 7th 19 at 14:22
2 answers
June 7th 19 at 14:24
Because there is an operator which constructs XNamespace from the string.
Thank you! - brendon78 commented on June 7th 19 at 14:27
June 7th 19 at 14:26
this means that there exists, or an overloaded assignment operator, but rather just the type extensionfor the required conversion

Find more questions by tags C#