Lambda variable names – to short name, or not to short name? [closed]

The way I usualy do it depends on the collection you’re enumerating over. If the name of the collection implies what type the lambda parameter will be, then I just go with the single letter, however if the collection isn’t as descriptive, then I’ll use a word.

IE:

myCollection.Where(person =>....); //non descriptive collection name

myPeopleCollection.Where(p=>...); // descriptive collection name

Leave a Comment