'Create a collection act like a database
Dim nbStorage = New Notebook() _
{New Notebook With {.Brand = "Lenovo", .Price = 27000, .Type = "X300", .Weight = 1.8} _
, New Notebook With {.Brand = "HP", .Price = 7500, .Type = "V3742TU", .Weight = 2.3} _
, New Notebook With {.Brand = "HP", .Price = 7800, .Type = "DV2730TX", .Weight = 2.2} _
, New Notebook With {.Brand = "DELL", .Price = 7300, .Type = "D630", .Weight = 2.5} _
}
'Create the query
'but the query will not execute right way
Dim result1 = From laptop In nbStorage _
Where laptop.Price > 7400
'Change some value before query executes
nbStorage(0).Price = 26000
'Execute the query
For Each laptop In result1
Console.WriteLine(laptop.ToString())
Next