I'm not to familiar with LINQ, so I'm trying to familiarize myself. I'm starting by finding examples that were posted here on the forums. One example is this thread, where I posted a solution that's 19 lines long, and JMcIlhinney post a solution that's a one-liner! So going off of his example:
I understand setting up the Enumerable range, but I don't understand the .OrderBy(Function(n). What exactly does that do,the function(n)? I mean I get the OrderBy sets it in some kind of order, but I don't get the Function(n).
vb.net Code:
Dim exclusive_numbers() As Integer = Enumerable.Range(0, 10).OrderBy(Function(n) r.Next(11)).ToArray
I understand setting up the Enumerable range, but I don't understand the .OrderBy(Function(n). What exactly does that do,the function(n)? I mean I get the OrderBy sets it in some kind of order, but I don't get the Function(n).