Table of Contents

Class RefWrapper<T>

Namespace
FishMMO.Shared
Assembly
FishMMO-SharedUtility.dll

A reference-type wrapper for value types or generics. Allows value types to be passed and modified by reference across different systems.

public class RefWrapper<T>

Type Parameters

T

The type of the value to wrap.

Inheritance
RefWrapper<T>
Inherited Members

Constructors

RefWrapper(T)

public RefWrapper(T value)

Parameters

value T

Properties

Value

The wrapped value. Accessible directly for high-performance scenarios.

public T Value { get; set; }

Property Value

T

Methods

Set(T)

Updates the value and returns the wrapper for method chaining.

public RefWrapper<T> Set(T newValue)

Parameters

newValue T

Returns

RefWrapper<T>

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 T?(RefWrapper<T>?)

Implicitly converts the wrapper to its underlying value.

public static implicit operator T?(RefWrapper<T>? wrapper)

Parameters

wrapper RefWrapper<T>

Returns

T