CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: random number

  1. #1
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    15

    random number

    how do i generante a random number. Can I get an example.

    thanks.

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    18
    Use the System.Random class:

    Random rnd = new Random();
    double rndValue = rnd.NextDouble();

  3. #3
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    15
    thanks!

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

Featured