(client) feat:Add Singleton and MonoSingleton class

This commit is contained in:
CaicukunChiji
2025-07-09 16:45:29 +08:00
parent f426941617
commit 76908dbf8a
5 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,8 @@
namespace Utils
{
public class Singleton<T> where T : new()
{
private static T _instance;
public static T Instance => _instance ??= new T();
}
}