I have a class Like this,
class Test
{
public int ID { get; set; }
public string Name { get; set; }
}
I want to select eligible items in List, I also want to set Name to null of the result list. I don't want to loop the collection again to set property value, is there a way to set the property value during the selection in linq?
This is my current query:
var v = from t in tests where ids.Contains(t.ID) select t;
Thanks