Implement the Singleton class then click Validate — your code will be compiled and tested live.
new.GetInstance().GetInstance() simultaneously, they get the same instance.private static Singleton? _instance;GetInstance(), check whether _instance is null and create it if needed.lock or Lazy<T>.