c# - Lambda expressions - select operator -
I would like to know how to write a liner (query using lambda expression in standard dot notation). I have an array of names, and I want to retrieve a new array of names based on a statement. Here is: order an array of names, and return a new list by that name which starts on a specific letter (letter M).
This is my current array:
string [] arrNames = {"Mike", "Zach", "Ella", "Allen", "Joe", " Roger "," Tito "}; I have to return such names as: Mike, Roger, Tito, Zac - These 4; The other 3 names (Alan, Ella and the names that begin with a letter starting with the letter "M" in alphabetical order, this operator is not the same as using "start with". Name of the names is selected I would like to receive all those names which are in alphabetical order from this letter and (i.e. name starts with M. jeed) . "M "See the alphabetical sequence with or above
Mitja
var results = arrNames.Where ( I = & gt; String. Compar ("M", i) & lt; = 0). Order By (i = & gt; i);
Comments
Post a Comment