0

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!

1
  • As suggested below, look into LINQ. There are a lot of great applications for it. Really nifty tool to use. Commented May 14, 2012 at 17:04

2 Answers 2

1

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')
Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.