I assume I am making a syntactical mistake, but as I don’t really now what this called and even searching for the error messages, I need your help.
I have a custom class with variables and also arrays in it. I try to initialize it and then adding manually values to the array.
public CustomClass myClass; myClass= new CustomClass; myClass.value = 100; myClass.list = 4; myClass.list = 120; myClass.value = 100; myClass.list = 4; myClass.list = 120; //etc...
NullReferenceException: Object reference not set to an instance of an object on line
myClass.value = 100;
I also tried :
public CustomClass myClass; myClass= new CustomClass();
IndexOutOfRangeException: Index was outside the bounds of the array
Any help is appreciated