【发布时间】:2014-05-06 05:59:57
【问题描述】:
这里我将 List 作为参数传递,但不知道调用字段与其他字段进行比较和检查。
//检查此代码
public RankModels created(List<collection_master> col)
{
if (col == null)
return null; ;
return new RankModels()
{
CustomerID = col.CustomerID,--error
AmountRecevied = col.AmountRecevied,--error
Date_Time = col.Date_Time,
Area = col.Area,
AgentID = col.AgentID,
Money_Receipt_No = col.Money_Receipt_No,
Payment_Mode = col.Payment_Mode,
Money_Receipt_Photo = col.Money_Receipt_Photo
};
}
【问题讨论】:
-
你不知道
col是一个列表吗? -
是的,不知道怎么做?
-
非常简单,学习 C# 并使用列表进行更多操作。该列表是一个包含大量对象的集合。每个对象在列表中都有一个位置。
-
在问一个问题之前你应该学习 List