Error : The Type Initializer of Deamon.Global threw an exception in c#

Posted by srk on Stack Overflow See other posts from Stack Overflow or by srk
Published on 2010-05-20T03:12:02Z Indexed on 2010/05/20 3:20 UTC
Read the original article Hit count: 347

Filed under:

I am using the below class file, where some variables are declared to use in the entire application. Now i used that variable [BlockLogOut] in another class file to make the value True.

I just put this below line and getting error in it.. "TypeInitializationException"

Global.BlockLogOut = True;

The wired thing is, it was working fine for many months and i am getting this error now on the above line. Of course i was modifying some other stuffs in the application, but surely not this class file. What would have been the problem ?

   namespace Daemon
    {
        class Global
        {
            public static bool BlockLogOut = false;
        }
    }

© Stack Overflow or respective owner

Related posts about c#