c# - Indexing in Linq -
Why do we use the index in "clause"? Does it start with an auto generated number answer zero? Simple examples would really be helpful.
var query = ... ou ((p, index) ..)
Whenever you need access to the index in your query, use it.
var alphabet = "ABCDEFGHKJLMNOPQRSTUVX"; Var also Litter = Alphabet. Where ((p, index) => (index% 2) == 1); Var oddLetters = alphabet.Where ((P, index) => (index% 2) == 0);
Comments
Post a Comment