So if you position your caret immediately left of the foreach, you will be able to select ForEach to Linq (Preview below) So naturally we want to make this easier for you. ![]() Finally there is the returning of this result set at the end of the method.There is the fact that passing items are being added to this result set.There is a condition being evaluated for each item in the source set.There is iteration over an incoming source set.This refactoring is available whenever you have a ForEach that is iterating over a master list and attempting to select either a subset, or a single item, from that list.Ĭonsider this legacy code example, where we have a list of orders and we want to extract a list of those orders which need Next-Day delivery. ![]() ![]() One really useful Refactoring provided by CodeRush for Roslyn is “ ForEach to Linq”
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |