Skip to content

Instantly share code, notes, and snippets.

@doeringp
Created May 19, 2017 05:12
Show Gist options
  • Save doeringp/8d144450a6a429a2c3e6c31ee3aa98c1 to your computer and use it in GitHub Desktop.
Save doeringp/8d144450a6a429a2c3e6c31ee3aa98c1 to your computer and use it in GitHub Desktop.
Lazy Loading with the Lazy class
private static readonly Lazy<string> _packagePhysicalPath = new Lazy<string>(ResolvePackagePath);
public static string PackagePhysicalPath
{
get
{
return _packagePhysicalPath.Value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment