I am having some trouble figuring out exactly how to do this, here is an example,
public static String[] myArray = new String[40];
private void tbSomeInfo_TextChanged(object sender, EventArgs e)
{
StepNumber1 sn1 = new StepNumber1();
sn1.DoSomething(ref myArray);
}
public class StepNumber1
{
public void DoSomething(ref myArray)
{
int start = 3;
int TempStart = 6;
CallPrivateFunction(ref myArray, start, tempStart);
}
private void CallPrivateFunction(ref myArray, int start, int tempStart)
{
String[] tempArray = myArray[start].split(','); // This line buggers up
}
}
I keep getting Object reference not set to an instance of an object error. Properties seems to be the way to go but since im still learning c# i would like to know why exactly this does not work, ty.
I have learned the error, I was trying to split a null line, case closed.