I\'d be interested in some before-and-after c# examples, some non-idiomatic vs idiomatic examples. Non-c# examples would be fine as well if they get the idea across. Thanks.
In PHP I sometimes encounter code like:
foreach ($array as $value) { $trimmed[] = trim($value); } return $trimmed;
Which idiomatically can be implemented with:
return array_map('trim', $array);