Results 1 to 2 of 2

Thread: Tip- Random Numbers

  1. #1

    Thread Starter
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    Tip- Random Numbers

    A common asked question is how to produce a random number.

    Well here is .NET way


    Dim rnd As New System.Random()

    rnd.Next(10)


    rnd.Next will return a value up to 10. If you dont want max value, just remove the 10 and it will randomly choose a postitve number anywhere in the Long Data Type range.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  2. #2
    Junior Member
    Join Date
    Jul 2002
    Posts
    20
    Thanks! Good info. Gonna have to file it away in my "how to" section.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width