Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27517

VS 2010 help with linq problem

$
0
0
Hello
I know nothing about linq (I want to learn)
I have the following code
Code:

  Private r As Random
    Sub Main()
        r = New Random

        'Create an array of exclusive numbers from 0 to 10
        Dim exclusive_numbers() As Integer = Enumerable.Range(0, 10).OrderBy(Function(n) r.Next(20,35)).ToArray
       
    End Sub

What I would like it to do is a) create an array with 11 elements b) load the array with random numbers from 20 to 35 without duplicates
Would you help with the code. My book on linq is not here yet and I need the code today if possible.
forever in your debt
george

Viewing all articles
Browse latest Browse all 27517

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>