Filtering Collection on Boolean property not working

JordinABT

New Member
I want to filter my list on one of the class property \[code\]isactive\[/code\]. But it is not filtering correctly it is showing all the item. Below is the code.\[code\]Roaster_Driver[] drivers = null;drivers = client.GetDriverDetail();List<Roaster_Driver> drvrs = drivers.Where(x => x.isactive = true).ToList();\[/code\]It showing all the items in the \[code\]drvrs\[/code\] even there are some inactive item in \[code\]drivers\[/code\]. When I debug the program and apply third LINQ Statement all the boolean statuses in the \[code\]drivers\[/code\] get updated by \[code\]True\[/code\]. I tried below alternative too but not worked for me.\[code\] var drvrs = (from driver in drivers where driver.isactive = true select driver);\[/code\]What is missing in my code or any changes required please help.
 
Back
Top