IType Interface
Represents a constructed type, for instance an array, a generic type instance, a pointer. A class, struct, enum or delegate are represented as an INamedType, which derive from IType.
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IType : ICompilationElement, IDisplayable, IEquatable<IType>
Remarks
The IType interface implements IEquatable<T>. The implementation uses the Default comparer. To use a different comparer, choose a different comparer from IDeclaration.Compilation.Comparers. You can also use Equals(IType?, TypeComparison) and specify a TypeComparison.
Properties
Name | Description |
---|---|
IsNullable | Gets the nullability of the type, or |
IsReferenceType | Gets a value indicating whether the type is a reference type. If the type is a generic parameter
without a |
SpecialType | Gets the SpecialType enumeration value for the current type. Provides a fast way to determine whether the current type is of a well-known type. |
TypeKind | Gets the kind of type. |
Methods
Name | Description |
---|---|
Equals(IType?, TypeComparison) | |
Equals(SpecialType) | Determines whether the current type is equal to a well-known special type. |
ToRef() | |
ToType() | Gets a reflection Type that represents the current type at run time. |