TypeInitializationException exception on creating an object

前端 未结 4 2043
天涯浪人
天涯浪人 2020-12-01 17:31

I have an assembly (class library project in .Net 3.5) that has some references like System.Configuration and System.Web. I use it on a web applica

4条回答
  •  一生所求
    2020-12-01 18:26

    TypeInitializationException is thrown when the class initializer fails. There can be a number of reasons to this, but most likely you have some code in your class' static constructor, that throws an exception. You can likely look at the InnerException property to get the real exception.

提交回复
热议问题