I'm having the following classes. While trying to set the values of the employee class with the following code, i`m getting the error message:Object reference not set to an instance of an object.
How can I solve it?
public class Employee
{
public Test[] test{ get; set; }
public Employee()
{
this.test[0].Name = "Tom";
this.test[0].age= 13;
}
}
public class Test
{
public string Name {get; set;}
public int Age {get; set;}
}