Just a small question about LINQ code

Hi,
I was thinking about this code: states.Where(s => s is T).FirstOrDefault() (also same for the other occurence).
If we do not need to make a field out of values, then I think this code: states.FirstOrDefault(s => s is T) will serve same purpose and save some processing power, even if it is minor in this age.
I am not a pro, so I might be mistaken.

Thank you

Hi Jindra,

Sorry we missed this question as on this occasion our tagging system has failed to let us know which course and lecture that this is relative to.
If you can update us on this we can have the appropriate TA help you on the understanding.

Apologies again as i meant to reply to this yesterday but on checking this post never got posted and was still waiting on a reply button being pressed!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms