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
size
intvalue to set
PointerSize(long)
Default constructor.
public PointerSize(long size)
Parameters
size
longvalue to set
PointerSize(nint)
Initializes a new instance of the PointerSize struct.
public PointerSize(nint size)
Parameters
size
nintThe 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
other
PointerSizeThe PointerSize to compare with this instance.
Returns
- bool
true
if 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
format
stringThe format.
Returns
Operators
operator +(PointerSize, PointerSize)
Adds two sizes.
public static PointerSize operator +(PointerSize left, PointerSize right)
Parameters
left
PointerSizeThe first size to add.
right
PointerSizeThe 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
value
PointerSizeThe size to scale.
scale
intThe 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
left
PointerSizeThe first value to compare.
right
PointerSizeThe second value to compare.
Returns
- bool
true
ifleft
has 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
value
PointerSizeThe 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
value
PointerSizeThe 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
value
PointerSizeThe 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
value
PointerSizeThe 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
value
intThe 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
value
longThe 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
value
nintThe 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
value
void*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
left
PointerSizeThe first value to compare.
right
PointerSizeThe second value to compare.
Returns
- bool
true
ifleft
has 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
value
PointerSizeThe size to scale.
scale
intThe 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
scale
intThe amount by which to scale the size.
value
PointerSizeThe size to scale.
Returns
- PointerSize
The scaled size.
operator -(PointerSize, PointerSize)
Subtracts two sizes.
public static PointerSize operator -(PointerSize left, PointerSize right)
Parameters
left
PointerSizeThe first size to subtract.
right
PointerSizeThe 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
value
PointerSizeThe 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
value
PointerSizeThe size to assert (unchanged).
Returns
- PointerSize
The asserted (unchanged) size.