The name of the class is the primary identifier that is used to discern the different between types, that is why within a given namespace, you cannot have duplicate class names.
The hint is that it is called a name space, within a given space all the classes will have unique names.
Perhaps a better question is why you think a class with a name/id of A
is somehow able to be confused with another class that has an name/id of B
?
solved Why compiler thinks two empty classes are different?