R
Rich P
public class xyz
{
...
}
List<xyz> mylist = new List<xyz>();
my question is if I want to add data to xyz thru the constructor or thru
properties?
xyz a = new xyz("aa","bb","cc");
mylist.add(a);
or
xyz a = new xyz();
a.fld1 = "aa";
a.fld2 = "bb";
a.fld3 = "cc";
mylist.add(a)
or how would I create my class so I could do this?
xyz a = new xyz(){"aa","bb","cc"};
mylist.add(a)
Thanks
Rich
{
...
}
List<xyz> mylist = new List<xyz>();
my question is if I want to add data to xyz thru the constructor or thru
properties?
xyz a = new xyz("aa","bb","cc");
mylist.add(a);
or
xyz a = new xyz();
a.fld1 = "aa";
a.fld2 = "bb";
a.fld3 = "cc";
mylist.add(a)
or how would I create my class so I could do this?
xyz a = new xyz(){"aa","bb","cc"};
mylist.add(a)
Thanks
Rich