Hello.
I am now starting to program in C# with no formal learning on this language :P by reading a program that I have.
I would appreciate some help.
I have two structs
Code:private struct firstone
{
public string name;
public int[] num;
public int[,] x;
.....
}
private struct secondone
{
public string name;
public double[] num;
.....
}
firstone[] firstvar;
firstone another;
secondone[] model;
secondone other;
Then inside the form1 load function I have
Code:firstvar= new firstone[5];
model= new secondone[5];
another=new firstone();
Now look at the last line. The variable another is created ?? with a new with something that must be a constructor to the struct
I guess
however later on, all four variables are used eventhough other was never created with a new!!
I mean, I though new was not necessary in the first place for the variables another and other , so is new needed or not?
and why only in one case and not the other?