P
placentiusz
class c1 {
private int field1;
private c2 field2;
public int Field1
{
get { return this.field1; }
set { this.field1 = value; }
}
public c2 Field2
{
get { return this.field2; }
set { this.field2 = value; }
}
public c1()
{
this.field1=1;
this.field2=null;
}
}
class c2 {
private int field3;
private int field4;
public int Field3
{
get { return this.field3; }
set { this.field3 = value; }
}
public int Field4
{
get { return this.field4; }
set { this.field4 = value; }
}
public c2()
{
this.field3=3;
this.field4=4;
}
}
i create objects:
c1 example = new c1();
c2 example2 = new c2();
example.Field2 = example2;
Arraylist newlist = new Arraylist();
newlist.Add(example);
object newlist is datasource for datagridview :
datagridview1.datasource=newlist;
i want to get table:
private int field1;
private c2 field2;
public int Field1
{
get { return this.field1; }
set { this.field1 = value; }
}
public c2 Field2
{
get { return this.field2; }
set { this.field2 = value; }
}
public c1()
{
this.field1=1;
this.field2=null;
}
}
class c2 {
private int field3;
private int field4;
public int Field3
{
get { return this.field3; }
set { this.field3 = value; }
}
public int Field4
{
get { return this.field4; }
set { this.field4 = value; }
}
public c2()
{
this.field3=3;
this.field4=4;
}
}
i create objects:
c1 example = new c1();
c2 example2 = new c2();
example.Field2 = example2;
Arraylist newlist = new Arraylist();
newlist.Add(example);
object newlist is datasource for datagridview :
datagridview1.datasource=newlist;
i want to get table: