主类里面:列表类
public class ServiceResponse
{
public string RequestId { get; set; }
public string ConnectionId { get; set; }
public List<FTTask> Tasks { get; set; }
}
列表类:
public class FTTask
{
public int TransType { get; set; }
public int Status { get; set; }
public string TaskStatus { get; set; }
}
ServiceResponse sr; // class object
int count = _SerResponse.Tasks.Count; // count list items
如何找到这个列表类的内部for循环的每个参数值的方式...
for (int j = 0; j < count; j++){
// Unable to find TransType,status values of list inside this loop
}
'var item = _SerResponse.Tasks [j]' –