using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TypeIntailization_Exception
{
class TypeInit
{
// Static constructor
static TypeInit()
{
}
static readonly TypeInit instance = new TypeInit();
public static TypeInit Instance
{
get { return instance; }
}
TypeInit() { }
}
class TestTypeInit
{
static public void Main()
{
TypeInit t = TypeInit.Instance;
}
}
}
when running this i get Type InTialization Exception how can i avoid this...