Most framework metadata objects have names associated with them. In
the case of data types (classes, structures, and so on), these are two
part names. The first part is the namespace name and the second part is
the unqualified name (simply the "name"). The
introspection API represents names using the
Identifier class. The
Identifier representing the unqualified name can be
obtained through the Name property. The
Identifier representing the namespace name, if
present, can be obtained through the Namespace property. This
Identifier class contains a
Name property which is the
String form of the name.
![]() | Important |
|---|---|
|
The |
The Identifier class also provides a
UniqueIdKey integer property that is useful if
you need to make many comparisons for a specific name. It might provide a
performance benefit over comparing entire strings.
Many nodes also provide a FullName property
of type String that contains the fully qualified
name which is the dotted join of the namespace, type name, and (if
applicable) member name.
Sometimes, you will need to acquire instances of
Identifier to pass to API methods. You can obtain
an Identifier given a String
using the static Identifier.For method.