class bill { private string _billInfo . . . private billDetail }
我要使用索引器,使用arraylist.怎么搞?
list自己就实现了索引器,如果你要对bill实现索引器 class bill { public List<billDetail> lst{get;set;} public billDetail this[int index] { get{return lst[index];} } } 一个封装而已 arraylist一样的,只不过要强制转换一下
list自己就实现了索引器,如果你要对bill实现索引器 class bill { public List<billDetail> lst{get;set;} public billDetail this[int index] { get{return lst[index];} } } 一个封装而已 arraylist一样的,只不过要强制转换一下
{
private string _billInfo
.
.
.
private billDetail
}
class bill
{
public List<billDetail> lst{get;set;}
public billDetail this[int index]
{
get{return lst[index];}
}
}
一个封装而已
arraylist一样的,只不过要强制转换一下
class bill
{
public List<billDetail> lst{get;set;}
public billDetail this[int index]
{
get{return lst[index];}
}
}
一个封装而已
arraylist一样的,只不过要强制转换一下