Sto provando a filtrare un elenco in modo che risulti in una lista con solo il sobborgo di brisbane?Come filtrare un elenco in C# con espressione lambda?
C#
Temp t1 = new Temp() { propertyaddress = "1 russel street", suburb = "brisbane" };
Temp t2 = new Temp() { propertyaddress = "12 bret street", suburb = "sydney" };
List<Temp> tlist = new List<Temp>();
tlist.Add(t1);
tlist.Add(t2);
List<Temp> tlistFiltered = new List<Temp>();
//tlistFiltered. how to filter this so the result is just the suburbs from brisbane?
public class Temp
{
public string propertyaddress { get; set; }
public string suburb { get; set; }
}