C# list 对象
//声明 public class DicDeviceOperationList { public string sameDevice { get; set; } public string sameOperation { get; set; } public string strSid { get; set; }
} //赋值 for (int i = 0; i < sameDeviceOperation.Count(); i++) { DicDeviceOperationList dicDeviceOperationList = new DicDeviceOperationList(); dicDeviceOperationList.sameDevice = sameDeviceOperation[i].Device; dicDeviceOperationList.sameOperation = sameDeviceOperation[i].Operation; dicDeviceOperationList.strSid = DBCenter.GetSystemID(); dicDeviceOperationLists.Add(dicDeviceOperationList); } //取值 dicDeviceOperationLists.Find(p => p.sameDevice == DEVICE && p.sameOperation == OPERATION) != null strSid = dicDeviceOperationLists.Find(p => p.sameDevice == DEVICE && p.sameOperation == OPERATION).strSid.ToString()