Q
Quibbles
Sorry if this is really basic, but I'm a c++ guy new to c#.
I'm trying to create a multidimensional array of a class, like so...
MyClass[,] theArray = new MyClass[4,4];
and calling a function in it like so...
theArray[0,0].aFunction();
yet I get a NullReferenceException whenever I run the program (no
compiler errors).
I'm pretty sure the problem is in the array because I made a nonarray
instance of the class and used it in the exact same way and
everything worked out fine.
I'm trying to create a multidimensional array of a class, like so...
MyClass[,] theArray = new MyClass[4,4];
and calling a function in it like so...
theArray[0,0].aFunction();
yet I get a NullReferenceException whenever I run the program (no
compiler errors).
I'm pretty sure the problem is in the array because I made a nonarray
instance of the class and used it in the exact same way and
everything worked out fine.