// Modified to use LINQ for readability.
IEnumerable<string> documents = oioublDocumentTypes.Select(documentName =>
LogHandler.LogInfo("Requesting profile info for doc type: " + documentName.ToString());
The above code is equaivalent to looping each of the documents from the oioublDocumentType array and then returning each of them as an IEnumerable of string. While doing that, log each to the file while iterating. This is just a single line of code which saves me from doing for-loop... Look's pretty cool...
So this means that you can execute a lot of method within the select before returning what you want to return as a result... you can even do calculation inside and return the correct calculation... pretty impressive..
Gratitude for the giving out post How to execute other methods while selecting in LINQ love to read this whole new thinking blog post such a attractive posting,ReplyDelete