Skip to content

Instantly share code, notes, and snippets.

Created Jun 16, 2022
What would you like to do?
public sealed class Singleton
private static readonly Lazy<Singleton> LazyInstance =
new Lazy<Singleton>(() => new Singleton());
private Singleton()
public static Singleton Instance => LazyInstance.Value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment