Class CHandle<T>
- Namespace
- CounterStrikeSharp.API.Modules.Utils
- Assembly
- CounterStrikeSharp.API.dll
public class CHandle<T> : IEquatable<CHandle<T>> where T : NativeEntity
Type Parameters
T
- Inheritance
-
CHandle<T>
- Implements
-
IEquatable<CHandle<T>>
- Derived
Constructors
CHandle(nint)
public CHandle(nint raw)
Parameters
raw
nint
CHandle(uint)
public CHandle(uint raw)
Parameters
raw
uint
Properties
Index
public uint Index { get; }
Property Value
IsValid
public bool IsValid { get; }
Property Value
Raw
public uint Raw { get; set; }
Property Value
SerialNum
public uint SerialNum { get; }
Property Value
Value
public T? Value { get; }
Property Value
- T
Methods
Equals(CHandle<T>?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CHandle<T>? other)
Parameters
other
CHandle<T>An object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
implicit operator uint(CHandle<T>)
public static implicit operator uint(CHandle<T> handle)
Parameters
handle
CHandle<T>