Struct TypeSpecifier
Description of a type specifier, that indicates whether a type is an array, pointer or reference.
Implements
Inherited Members
Namespace: Alphaleonis.Reflection.Metadata
Assembly: Alphaleonis.Reflection.Metadata.dll
Syntax
public struct TypeSpecifier : IEquatable<TypeSpecifier>
Fields
| Improve this Doc View SourcePointer
Indicates a pointer specifier in a type name, i.e. '*'.
Declaration
public static readonly TypeSpecifier Pointer
Field Value
Type | Description |
---|---|
TypeSpecifier |
Reference
Indicates a reference specifier in a type name, i.e. '&'.
Declaration
public static readonly TypeSpecifier Reference
Field Value
Type | Description |
---|---|
TypeSpecifier |
Properties
| Improve this Doc View SourceArrayRank
Gets the array rank if this indicates an array, or 0 otherwise.
Declaration
public int ArrayRank { get; }
Property Value
Type | Description |
---|---|
Int32 | The array rank. |
Kind
Gets the type of this specifier.
Declaration
public TypeSpecifierKind Kind { get; }
Property Value
Type | Description |
---|---|
TypeSpecifierKind |
Methods
| Improve this Doc View SourceArray(Int32)
Indicates an array specifier in a type name, i.e. '[]', or '[,,]' etc.
Declaration
public static TypeSpecifier Array(int rank)
Parameters
Type | Name | Description |
---|---|---|
Int32 | rank | The rank of the array. Must be greater than 0. |
Returns
Type | Description |
---|---|
TypeSpecifier |
Equals(TypeSpecifier)
Tests if this TypeSpecifier is considered equal to another.
Declaration
public bool Equals(TypeSpecifier other)
Parameters
Type | Name | Description |
---|---|---|
TypeSpecifier | other | The type specifier to compare to this object. |
Returns
Type | Description |
---|---|
Boolean | True if the objects are considered equal, false if they are not. |
Equals(Object)
Tests if this object is considered equal to another.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare to this object. |
Returns
Type | Description |
---|---|
Boolean | True if the objects are considered equal, false if they are not. |
Overrides
| Improve this Doc View SourceGetHashCode()
Calculates a hash code for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for this object. |
Overrides
| Improve this Doc View SourceToString()
Convert this object into a string representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents this object. |