C
ChrisN
Just learning LINQ by going through the MSDN 101 LINQ samples, which
are in C#. I'm a VB developer and my C# doesn't extend to lambda
functions yet!
I'm stuck on...
public void Linq5() {
string[] digits = { "zero", "one", "two", "three", "four", "five",
"six", "seven", "eight", "nine" };
var shortDigits = digits.Where((digit, index) => digit.Length <
index);
Console.WriteLine("Short digits:");
foreach (var d in shortDigits) {
Console.WriteLine("The word {0} is shorter than its value.",
d);
}
}
Grateful if someone could rewrite the lambda expression
var shortDigits = digits.Where((digit, index) => digit.Length <
index);
in VB for me. I just can't work it out.
Thanks,
ChrisN
are in C#. I'm a VB developer and my C# doesn't extend to lambda
functions yet!
I'm stuck on...
public void Linq5() {
string[] digits = { "zero", "one", "two", "three", "four", "five",
"six", "seven", "eight", "nine" };
var shortDigits = digits.Where((digit, index) => digit.Length <
index);
Console.WriteLine("Short digits:");
foreach (var d in shortDigits) {
Console.WriteLine("The word {0} is shorter than its value.",
d);
}
}
Grateful if someone could rewrite the lambda expression
var shortDigits = digits.Where((digit, index) => digit.Length <
index);
in VB for me. I just can't work it out.
Thanks,
ChrisN