嗨,我已经生成了一个类文件,如下所示-
public partial class Awmds
{
private List<AwmdsBol_segment> bol_segmentField;
public Awmds()
{
this.bol_segmentField = new List<AwmdsBol_segment>();
}
public List<AwmdsBol_segment> Bol_segment
{
get
{
return this.bol_segmentField;
}
set
{
this.bol_segmentField = value;
}
}
}
public partial class AwmdsBol_segment
{
private AwmdsBol_segmentBol_id bol_idField;
private sbyte consolidated_CargoField;
private AwmdsBol_segmentLoad_unload_place load_unload_placeField;
private AwmdsBol_segmentTraders_segment traders_segmentField;
private List<AwmdsBol_segmentCtn_segment> ctn_segmentField;
private AwmdsBol_segmentGoods_segment goods_segmentField;
private string value_segmentField;
public AwmdsBol_segment()
{
this.goods_segmentField = new AwmdsBol_segmentGoods_segment();
this.ctn_segmentField = new List<AwmdsBol_segmentCtn_segment>();
this.traders_segmentField = new AwmdsBol_segmentTraders_segment();
this.load_unload_placeField = new AwmdsBol_segmentLoad_unload_place();
this.bol_idField = new AwmdsBol_segmentBol_id();
}
public AwmdsBol_segmentBol_id Bol_id
{
get
{
return this.bol_idField;
}
set
{
this.bol_idField = value;
}
}
...
我可以设置不在 list<> 数组中的类成员值。以下代码适用于非数组成员 -
Awmds xmlRoot = new Awmds();
xmlRoot.General_segment.General_segment_id.Customs_office_code = Convert.ToInt16(Customs_office_code);
我不知道如何设置由 get/set 逻辑定义的类文件的列表数组值 :( 并且也进行了很多搜索,但没有任何效果!
有人可以帮我调用/设置类文件的列表<>成员值吗?