Is the class uniquely identified through the class name, namespace, and assembly in AppDomain?
The short answer is yes.
Longer answer:
You can consider a few subtle points.
First, from the perspective of the CLR, there is no such thing as a namespace. System.String string type name in relation to the CLR. Therefore, it is more accurate to say that from the point of view of the CLR, a type is uniquely identified by name and assembly.
Secondly, types can be nested. Thus, types are actually uniquely identified by their name containing the type (if there is one) and the assembly.
Third, types can be shared. Foo.Bar and Foo.Bar<T> are different types. Thus, types are identified by their name containing the type, assembly, and general arity.
Fourthly, and this is strange, the CLR considers types in assemblies loaded with Load different from types in the same assembly loaded with LoadFrom . You may encounter situations where the CLR tells you that the Foo type in the Bar assembly is incompatible with the Foo type in the assembly panel, and the boy is confused.
source share