Reputation: 10542
Is there any way to query an array of mine in VB.net? I just need something temporary in order to query it for a report but I do not want to make an external database just for something that's going to be temp. I just need to be able to say select * from tempTable
etc etc.
Any help or links would be great!
Upvotes: 0
Views: 92
Reputation: 223257
You can use LINQ to query array in Vb.Net. Please see the article 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
Upvotes: 1
Reputation: 1128
You can use 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')
Upvotes: 1