TypeInitializationException
-
Hi, i hav two classes as following; class1.cs ---------- namespace NAS { // fields // properties public class Class1 { public Class1() {} } // member methods // ... } class2.cs ----------- namespace NAS { public class Class2 { private Class1 class1Obj; public void Meth() { class1Obj = new Class1(); // here i get an error } // it throws TypeInitializationException } } when i create an object of Class1 under Class2, i m getting TypeInitializationException. But i hav referred the class corretly in Reference.. Please help me.. :confused: NAS
-
Hi, i hav two classes as following; class1.cs ---------- namespace NAS { // fields // properties public class Class1 { public Class1() {} } // member methods // ... } class2.cs ----------- namespace NAS { public class Class2 { private Class1 class1Obj; public void Meth() { class1Obj = new Class1(); // here i get an error } // it throws TypeInitializationException } } when i create an object of Class1 under Class2, i m getting TypeInitializationException. But i hav referred the class corretly in Reference.. Please help me.. :confused: NAS
-
If that code is exactly identical to what you are running there is no way that you would get that exception. Im guessing there is some form of reflection and/or remoting going on somewhere!