none
Select. Please, what am I doing wrong? RRS feed

  • Question

  • Hello,

    I need to apply a transformation to a property in all records of a list:
      articles.Select(a => a.Active = True);

    I don't get an error but the transformation does not take effect.

    Isn't this possible using Linq?

    Do I need a loop?

    Thanks,
    Miguel
    Friday, February 6, 2009 10:16 PM

Answers

  • The Select operator is deferred.  Nothing actually happens until you enumerate the result sequence.  A loop would do this for you.




    Wayward LINQ Lacky
    Saturday, February 7, 2009 4:22 AM
    Moderator