C# 查询集合对象
我有代码从一些内置库中获取数据C# 查询集合对象,c#,linq,C#,Linq,我有代码从一些内置库中获取数据 PwCollection Props = PwSrv.GetItem(row["Name"].ToString()).GetProperties();//.AsQueryable(); foreach (PwItem Prop in Props) {
PwCollection Props = PwSrv.GetItem(row["Name"].ToString()).GetProperties();//.AsQueryable();
foreach (PwItem Prop in Props)
{
Console.WriteLine(Prop.Name);
Console.WriteLine(Prop.Description);
Console.WriteLine(Prop.Value);
}
但不是循环我想在props中查询的每条记录并获得所需的值,而是我在props集合中拥有的属性
请帮助我查询此集合
谢谢
迪利普谢谢你的时间,我能解决它
DBValue = lpropertycollection.GetProperties().OfType<PwItem>().Where(t => t.Name == row["Name"] + DBColName).FirstOrDefault().Value.ToString();
DBValue=lpropertycollection.GetProperties().OfType().Where(t=>t.Name==row[“Name”]+DBColName.FirstOrDefault().Value.ToString();
在不了解您的库的情况下,我们无法帮助解决如何在源代码处调用它进行查询。。。