[]
The maximum number of bytes to which a pointer can point. Use for a count that must span the full range of a pointer. Equivalent to Windows type SIZE_T.
public struct PointerSize
Default constructor.
public PointerSize(int size)
size
intvalue to set
Default constructor.
public PointerSize(long size)
size
longvalue to set
Initializes a new instance of the PointerSize struct.
public PointerSize(IntPtr size)
size
System.IntPtrThe size.
An empty pointer size initialized to zero.
public static readonly PointerSize Zero
Determines whether the specified PointerSize is equal to this instance.
public bool Equals(PointerSize other)
other
PointerSizeThe PointerSize to compare with this instance.
true
if the specified PointerSize is equal to this instance; otherwise, false
.
Determines whether the specified object is equal to this instance.
public override bool Equals(object value)
value
objectThe object to compare with this instance.
true
if the specified object is equal to this instance; otherwise, false
.
Returns a hash code for this instance.
public override int GetHashCode()
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Returns a string that represents this instance.
public override string ToString()
A string that represents this instance.
Returns a string that represents this instance.
public string ToString(string format)
format
stringThe format.
A string that represents this instance.
Adds two sizes.
public static PointerSize operator +(PointerSize left, PointerSize right)
left
PointerSizeThe first size to add.
right
PointerSizeThe second size to add.
The sum of the two sizes.
Scales a size by the given value.
public static PointerSize operator /(PointerSize value, int scale)
value
PointerSizeThe size to scale.
scale
intThe amount by which to scale the size.
The scaled size.
Tests for equality between two objects.
public static bool operator ==(PointerSize left, PointerSize right)
left
PointerSizeThe first value to compare.
right
PointerSizeThe second value to compare.
true
if left
has the same value as right
; otherwise, false
.
Performs an implicit conversion from PointerSize to int.
public static implicit operator int(PointerSize value)
value
PointerSizeThe value.
The result of the conversion.
Performs an implicit conversion from PointerSize to long.
public static implicit operator long(PointerSize value)
value
PointerSizeThe value.
The result of the conversion.
Performs an implicit conversion from PointerSize to System.IntPtr.
public static implicit operator IntPtr(PointerSize value)
value
PointerSizeThe value.
The result of the conversion.
Performs an implicit conversion from PointerSize to void*.
[CLSCompliant(false)]
public static implicit operator void*(PointerSize value)
value
PointerSizeThe value.
The result of the conversion.
Performs an implicit conversion from PointerSize to int.
public static implicit operator PointerSize(int value)
value
intThe value.
The result of the conversion.
Performs an implicit conversion from PointerSize to long.
public static implicit operator PointerSize(long value)
value
longThe value.
The result of the conversion.
Performs an implicit conversion from System.IntPtr to PointerSize.
public static implicit operator PointerSize(IntPtr value)
value
System.IntPtrThe value.
The result of the conversion.
Performs an implicit conversion from void* to PointerSize.
[CLSCompliant(false)]
public static implicit operator PointerSize(void* value)
value
void*The value.
The result of the conversion.
Tests for inequality between two objects.
public static bool operator !=(PointerSize left, PointerSize right)
left
PointerSizeThe first value to compare.
right
PointerSizeThe second value to compare.
true
if left
has a different value than right
; otherwise, false
.
Scales a size by the given value.
public static PointerSize operator *(PointerSize value, int scale)
value
PointerSizeThe size to scale.
scale
intThe amount by which to scale the size.
The scaled size.
Scales a size by the given value.
public static PointerSize operator *(int scale, PointerSize value)
scale
intThe amount by which to scale the size.
value
PointerSizeThe size to scale.
The scaled size.
Subtracts two sizes.
public static PointerSize operator -(PointerSize left, PointerSize right)
left
PointerSizeThe first size to subtract.
right
PointerSizeThe second size to subtract.
The difference of the two sizes.
Reverses the direction of a given size.
public static PointerSize operator -(PointerSize value)
value
PointerSizeThe size to negate.
A size facing in the opposite direction.
Assert a size (return it unchanged).
public static PointerSize operator +(PointerSize value)
value
PointerSizeThe size to assert (unchange).
The asserted (unchanged) size.