Struct ArrayDimension
- Namespace
- AsmResolver.DotNet.Signatures
- Assembly
- AsmResolver.DotNet.dll
Represents a single dimension in an array specification.
public readonly struct ArrayDimension : IEquatable<ArrayDimension>
- Implements
- Inherited Members
Constructors
ArrayDimension(int)
Creates a new array dimension.
public ArrayDimension(int size)
Parameters
sizeintThe number of elements in this dimension.
ArrayDimension(int?, int?)
Creates a new array dimension.
public ArrayDimension(int? size, int? lowerBound)
Parameters
sizeint?The number of elements in this dimension.
lowerBoundint?the lower bound for each index in the dimension (if specified)
Properties
LowerBound
Gets or sets the lower bound for each index in the dimension (if specified).
public int? LowerBound { get; }
Property Value
- int?
Remarks
When this value is not specified (null), a lower bound of 0 is assumed by the CLR.
Size
Gets or sets the number of elements in the dimension (if specified).
public int? Size { get; }
Property Value
- int?
Remarks
When this value is not specified (null), no upper bound on the number of elements is assumed by the CLR.
Methods
Equals(ArrayDimension)
Determines whether two dimensions are considered equal.
public bool Equals(ArrayDimension other)
Parameters
otherArrayDimension
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.