Hiya
If i have a Ranorex.Table control, that contains 20 columns and 5000 rows, and i want to search to find all rows that have:
- Column1 = "Hello"
- Column2 = "World"
- Column3 = "Nice"
- Column4 = "Day"
- etc.
I could build a quite large ranorex xpath for that.
What would be better (I dont know if its possible) is to write a LINQ query on the Table.Rows collection
e.g.
Dim myrows = From row in Table.Rows where row.item("Column1") = "Hello" ... select row
Is that possible?
Regards
Ranorex.Table and LINQ
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex.Table and LINQ
Sure, you can use LINQ to select rows in a table. Ranorex uses standard .NET collection types that LINQ can be used with, e.g. the Table.Rows property returns a list of type System.Collections.Generic.IList<Row>. In your situation using LINQ is definitely preferable to RanoreXPath, since the C# or VB.NET compiler can check your statement for syntax errors.
Regards,
Alex
Ranorex Support Team
Regards,
Alex
Ranorex Support Team
Re: Ranorex.Table and LINQ
nice, thanks!