Hi, i am haveing problems with this code
namespace test
{
class Program
{
class MyClass{
public int x;
int y;
}
static void Main(string[] args)
{
MyClass[][] myclass=new MyClass[4][];
myclass[0]=new MyClass[5];
myclass[0][0].x=10; // error here
}
}
}
I am getting this error
Exception System.NullReferenceException was thrown in debuggee:
Object reference not set to an instance of an object.
What am i doing wrong?