What is the difference between this two ways of initializing arrays. I have instantiated an array Guys[] guy = new Guy[3]; where Guys is a class having fields Name, Cash, MyLabel(a Label), MyRadioButton(a RadioButton)
guys[0] = new Guy()
{Name = "Joe", Cash = 50, MyLabel = joeBetlabel, MyRadioButton = joeRadioButton };
guys[1] = new Guy()
{ Name = "Bob", Cash = 75, MyLabel = bobBetlabel, MyRadioButton = bobRadioButton };
guys[2] = new Guy()
{ Name = "Al", Cash = 45, MyRadioButton = alRadioButton, MyLabel = AlBetlabel };
the second method is
guys = new Guy[3]
{
new Guy() {Name="Joe", Cash=50, MyRadioButton=rbGuy1, MyLabel=lblBetDesc1},
new Guy() {Name="Bob", Cash=75, MyRadioButton=rbGuy2, MyLabel=lblBetDesc2},
new Guy() {Name="Al", Cash=45, MyRadioButton=rbGuy3, MyLabel=lblBetDesc3}
};
What does each method actually mean especially in terms of using an array member in both cases