Table of Contents

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
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

uint

IsValid

public bool IsValid { get; }

Property Value

bool

Raw

public uint Raw { get; set; }

Property Value

uint

SerialNum

public uint SerialNum { get; }

Property Value

uint

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

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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>

Returns

uint