5
Answers

Newbie need help understanding multi parameter lambda?

Ab Laxman

Ab Laxman

6y
249
1
Hi,
I'm new to coding and C# in general but I do know basics of the program. I also like LINQ but recently I came across a piece of code in the internet (on a website) 
  1. var matchCount = deqn.Value.Select((c, i) => deqn.Value.Substring(i)).Count(sub => sub.StartsWith("\\tag")); 
 where deqn is a xml node and the above code is to find how many times the string \tag appears in that node.
I can't figure out how the code works....I'm not familiar with multi parameter lambda expressions.
Can anyone explain (break it down) the code in details to me?
Answers (5)