【发布时间】:2011-08-07 23:56:57
【问题描述】:
我有一串逗号分隔的值,称为 driverids。
我应该使用逗号分隔列表还是该逗号分隔列表来自的数组在连接中使用它。
如何在 linq 中使用连接到这些驱动程序 ID?
_currentDriverData.AddRange(elementsCurrent.Join(driverids)
// gets distinct driver ids from the driver duty status change logs;
string driverids = string.Join(",", _logsDutyStatusChange
.Select(item => item.did)
.Distinct()
.ToArray());
//gets all current driver information
//_currentDriverData.AddRange(elementsCurrent.Where(drivers)
_currentDriverData.AddRange(elementsCurrent.Join(driverids).Select.........
【问题讨论】:
-
你想加入他们什么?
-
我试图在我的选择中只获取那些驱动程序 ID