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

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -