why would a static constructor throw exception when it references to a const string in another class.
class MyClass
{
static MyClass()
{
ExamineLog();
}
static ExamineLog()
{
FilePath = HttpContext.Current.Server.MapPath(Helper.LogConfiguration);
}
}
class Helper
{
public const string LogConfiguration= "\rootpath\counters.txt";
}
The exception thrown is object reference not set to an instance of an object. The stack trace points to the line where attempt is made to read the constant value. Any thoughts?