Table of Contents

Class Singleton<T>

Namespace
Garyon.Objects
Assembly
Garyon.dll

Provides a single instance of a type.

public sealed class Singleton<T> where T : new()

Type Parameters

T

The type whose single instance to hold.

Inheritance
Singleton<T>
Inherited Members
Extension Methods

Fields

Instance

The single instance of the type.

public static readonly T Instance

Field Value

T

Remarks

It is not required that the type is not initialized elsewhere. This can also be used as a shared instance.