Class Type::Type

A type.

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getABaseInterface

Gets an immediate base interface of this class, if any.

getABaseType

Gets an immediate base type of this type, if any.

getAMember

Gets a member of this type, if any.

getASubtype

Gets an immediate subtype of this type, if any.

getBaseClass

Gets the immediate base class of this class, if any.

getConversionIndex

Gets an index for implicit conversions. A type can be converted to another numeric type of a higher index.

getDeclaringType

Gets the containing type of this type, if any.

getLocation

Gets the location of this element.

getName

Gets the name of this element.

getNamespace

Gets the namespace directly containing this type, if any.

getParent

Gets the parent of this type container, if any.

getUnboundType

Gets the unbound generic type of this type, or this if the type is already unbound.

getUnderlyingType

Gets the machine type used to store this type.

hasQualifiedName

Holds if this element has the qualified name qualifier.name.

isClass

Holds if this type is a class.

isEnum

Holds if this type is an enum.

isInterface

Holds if this type is an interface.

isPrivate

Holds if this type is private.

isPublic

Holds if this type is public.

isSystemType

Holds if this type is a member of the System namespace and has the name name. This is the same as getQualifiedName() = "System.<name>", but is faster to compute.

toString

Gets a textual representation of this element.

Inherited predicates

compiledFromSource

Holds if this element was compiled from source code that is also present in the database. That is, this element corresponds to another element from source.

from NamedElement
fromSource

Holds if this element is from source code.

from Element
getALocation

Gets a location of this element, which can include locations in both DLLs and source files.

from Element
getAnAttribute

Gets an attribute (for example [Obsolete]) of this declaration, if any.

from Declaration
getCSharpDeclaration

Gets the C# declaration corresponding to this CIL declaration, if any. Note that this is only for source/unconstructed declarations.

from Declaration
getFile

Gets the file containing this element.

from Element
getLabel

Gets a unique string label for this element.

from NamedElement
getLanguage

Gets the “language” of this program element, as defined by the extension of the filename. For example, C# has language “cs”, and Visual Basic has language “vb”.

from Element
getQualifiedName

Gets the fully qualified name of this element, for example the fully qualified name of M on line 3 is N.C.M in

from NamedElement
getSourceDeclaration

Gets the unbound version of this declaration.

from Declaration
getUndecoratedName

Gets the name of this type without additional syntax such as [], *, or <...>.

from Type
hasName

Holds if this element has name ‘name’.

from NamedElement
hasQualifiedName

Holds if this element has qualified name qualifiedName, for example System.Console.WriteLine.

from NamedElement
isSourceDeclaration

Holds if this declaration is a source declaration.

from Declaration
matchesHandle

Holds if other has the same metadata handle in the same assembly.

from NamedElement
toStringWithTypes

Gets the full textual representation of this element, including type information.

from TypeContainer