Friday, 8 July 2011
Abstract Vs Interface - Good read.
Everybody knows what are the points discussed here but still worth reading it as most of the time we forget basics since we are living in a abstract world of coding.
Saturday, 18 June 2011
C# - Singleton Class using Lazy <T> in Dotnet .40
Code Snippet,
public sealed class Singleton
{
private static readonly Lazy lazy =
new Lazy(() => new Singleton());
public static Singleton Instance { get { return lazy.Value; } }
private Singleton()
{
}
}
Reference:-http://csharpindepth.com/Articles/General/Singleton.aspx
public sealed class Singleton
{
private static readonly Lazy
new Lazy
public static Singleton Instance { get { return lazy.Value; } }
private Singleton()
{
}
}
Reference:-http://csharpindepth.com/Articles/General/Singleton.aspx
Subscribe to:
Posts (Atom)