Skip to content

Instantly share code, notes, and snippets.

@alimozdemir
Created August 30, 2018 13:07
Show Gist options
  • Save alimozdemir/a0fc1595847bb797f822199462d4f9c8 to your computer and use it in GitHub Desktop.
Save alimozdemir/a0fc1595847bb797f822199462d4f9c8 to your computer and use it in GitHub Desktop.
ActionHistory_V3.cs singleton pattern
public class ActionHistory_V3 : IActionHistory
{
private static Lazy<ActionHistory_V3> instance =
new Lazy<ActionHistory_V3>(() => new ActionHistory_V3());
public static ActionHistory_V3 Instance { get; } = instance.Value;
private ActionHistory_V3()
{
....
}
....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment