Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 查询集合对象_C#_Linq - Fatal编程技术网

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();

在不了解您的库的情况下,我们无法帮助解决如何在源代码处调用它进行查询。。。