Struct PointerSize
- Namespace
- SharpVulkan
- Assembly
- Lime.dll
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
- Inherited Members
Constructors
PointerSize(int)
Default constructor.
public PointerSize(int size)
Parameters
sizeintvalue to set
PointerSize(long)
Default constructor.
public PointerSize(long size)
Parameters
sizelongvalue to set
PointerSize(nint)
Initializes a new instance of the PointerSize struct.
public PointerSize(nint size)
Parameters
sizenintThe size.
Fields
Zero
An empty pointer size initialized to zero.
public static readonly PointerSize Zero
Field Value
Methods
Equals(PointerSize)
Determines whether the specified PointerSize is equal to this instance.
public bool Equals(PointerSize other)
Parameters
otherPointerSizeThe PointerSize to compare with this instance.
Returns
- bool
trueif the specified PointerSize is equal to this instance; otherwise,false.
Equals(object)
Determines whether the specified object is equal to this instance.
public override bool Equals(object value)
Parameters
Returns
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
- int
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
ToString()
Returns a string that represents this instance.
public override string ToString()
Returns
ToString(string)
Returns a string that represents this instance.
public string ToString(string format)
Parameters
formatstringThe format.
Returns
Operators
operator +(PointerSize, PointerSize)
Adds two sizes.
public static PointerSize operator +(PointerSize left, PointerSize right)
Parameters
leftPointerSizeThe first size to add.
rightPointerSizeThe second size to add.
Returns
- PointerSize
The sum of the two sizes.
operator /(PointerSize, int)
Scales a size by the given value.
public static PointerSize operator /(PointerSize value, int scale)
Parameters
valuePointerSizeThe size to scale.
scaleintThe amount by which to scale the size.
Returns
- PointerSize
The scaled size.
operator ==(PointerSize, PointerSize)
Tests for equality between two objects.
public static bool operator ==(PointerSize left, PointerSize right)
Parameters
leftPointerSizeThe first value to compare.
rightPointerSizeThe second value to compare.
Returns
- bool
trueiflefthas the same value asright; otherwise,false.
implicit operator int(PointerSize)
Performs an implicit conversion from PointerSize to int.
public static implicit operator int(PointerSize value)
Parameters
valuePointerSizeThe value.
Returns
- int
The result of the conversion.
implicit operator long(PointerSize)
Performs an implicit conversion from PointerSize to long.
public static implicit operator long(PointerSize value)
Parameters
valuePointerSizeThe value.
Returns
- long
The result of the conversion.
implicit operator nint(PointerSize)
Performs an implicit conversion from PointerSize to nint.
public static implicit operator nint(PointerSize value)
Parameters
valuePointerSizeThe value.
Returns
- nint
The result of the conversion.
implicit operator void*(PointerSize)
Performs an implicit conversion from PointerSize to void*.
public static implicit operator void*(PointerSize value)
Parameters
valuePointerSizeThe value.
Returns
- void*
The result of the conversion.
implicit operator PointerSize(int)
Performs an implicit conversion from PointerSize to int.
public static implicit operator PointerSize(int value)
Parameters
valueintThe value.
Returns
- PointerSize
The result of the conversion.
implicit operator PointerSize(long)
Performs an implicit conversion from PointerSize to long.
public static implicit operator PointerSize(long value)
Parameters
valuelongThe value.
Returns
- PointerSize
The result of the conversion.
implicit operator PointerSize(nint)
Performs an implicit conversion from nint to PointerSize.
public static implicit operator PointerSize(nint value)
Parameters
valuenintThe value.
Returns
- PointerSize
The result of the conversion.
implicit operator PointerSize(void*)
Performs an implicit conversion from void* to PointerSize.
public static implicit operator PointerSize(void* value)
Parameters
valuevoid*The value.
Returns
- PointerSize
The result of the conversion.
operator !=(PointerSize, PointerSize)
Tests for inequality between two objects.
public static bool operator !=(PointerSize left, PointerSize right)
Parameters
leftPointerSizeThe first value to compare.
rightPointerSizeThe second value to compare.
Returns
- bool
trueiflefthas a different value thanright; otherwise,false.
operator *(PointerSize, int)
Scales a size by the given value.
public static PointerSize operator *(PointerSize value, int scale)
Parameters
valuePointerSizeThe size to scale.
scaleintThe amount by which to scale the size.
Returns
- PointerSize
The scaled size.
operator *(int, PointerSize)
Scales a size by the given value.
public static PointerSize operator *(int scale, PointerSize value)
Parameters
scaleintThe amount by which to scale the size.
valuePointerSizeThe size to scale.
Returns
- PointerSize
The scaled size.
operator -(PointerSize, PointerSize)
Subtracts two sizes.
public static PointerSize operator -(PointerSize left, PointerSize right)
Parameters
leftPointerSizeThe first size to subtract.
rightPointerSizeThe second size to subtract.
Returns
- PointerSize
The difference of the two sizes.
operator -(PointerSize)
Reverses the direction of a given size.
public static PointerSize operator -(PointerSize value)
Parameters
valuePointerSizeThe size to negate.
Returns
- PointerSize
A size facing in the opposite direction.
operator +(PointerSize)
Assert a size (return it unchanged).
public static PointerSize operator +(PointerSize value)
Parameters
valuePointerSizeThe size to assert (unchanged).
Returns
- PointerSize
The asserted (unchanged) size.