有没有办法在VB.net中查询我的数组?我只需要一些临时的东西来查询它的报告,但我不想只为了一些临时的东西建立一个外部数据库。我只需要能够说select * from tempTable
等等。
任何帮助或链接都会很棒!
答案 0 :(得分:1)
您可以使用LINQ
Dim Report_Array As List(Of clsReport) = Get_Report_List
Dim Selected_Report As List(Of clsReport) = (From R As clsReport In Report_Array
WHERE R.ReportName = 'ABC')
答案 1 :(得分:1)
您可以使用LINQ在Vb.Net中查询数组。请参阅文章Using LINQ to Objects in Visual Basic
Dim Birds() As String = {"Indigo Bunting", "Rose Breasted Grosbeak", _
"Robin", "House Finch", "Gold Finch", _
"Ruby Throated Hummingbird", _
"Rufous Hummingbird", "Downy Woodpecker"}
Dim list = From b In Birds _
Where b.StartsWith("R") _
Select b