Am using winforms in c# with visual studio 2015
This is my class
public class advmessage
{
public string[] message;
}
so then in the load event of form1 I do this
advmessage newadvmessage = new advmessage();
newadvmessage[1]="Hello";
and for that assignment, it throws the exception for null reference and says object reference not set to an instance of an object.
So if I have a class that does not need to be an array, everything works find, but on the ones that use arrays, is where it has the exception.
Also, I do not have a get set or return for any of the classes, and that might b the problem but yet when I added the { get; set; } in there it still had a problem. I could understand a null reference, if I referenced a null string, but I am just trying to set the message property that will be shown in a text box to the user.
Any help would be greatly appreciated.