string[] digits = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };
var getDigits =
from d in digits
where d[0] == 't'
select d;
getDigits.Dump();
This selects all elements in the array where the first letter is "t".
Result is:
two
three
Enjoy!
No comments:
Post a Comment