The trouble with the world is that the stupid are cocksure and the intelligent full of doubt. --Bertrand Russell
Welcome to my blog and project site for Microsoft.NET development.

I've been a full time .NET developer for ten years, but I didn't start my professional life as a programmer ... more
Share/Print this page:

Online Random Number Generator

Including C# source code

By steve on February 14, 2007.
Updated on January 22, 2012.
Viewed 10,305 times (0 times today).
Article AttributesArticle AttributesArticle TypesLanguage ElementsLanguagesTopics
Has DownloadsHas ImagesSnippetData TypesC#Math and Statistics

Downloads

  • Random Number Generator - ASP.NET 1.1 Solution - Generate Uniform Random Numbers for various data types including DateTime and TimeSpan

Summary

How can I generate my own random number sets?

We have an online tool that will allow you to create up to 10000 random numbers at a time of various data types including:

  • Boolean
  • Int16
  • Int32 (Integer)
  • Int64
  • Float (single precision)
  • Double (double precision)
  • DateTime
  • Time Span

Download the solution at the top of this article for all the code.

For more on how the random numbers are generated have a look at my RandomProvider class.

Screen shot of Random Number Generator in the download above

Copy and Paste Cleanly

Note that with my online random number generator the random numbers are provided within <pre></pre> tags so you can easily copy and paste them into your favorite text editor or Excel without a bunch of html markup in the way.

Gaussian (Normal) and Exponential Distributions Also Available

The RandomProvider class in the download also provides gaussian and exponentially distributed random numbers. One of these days I'll get around to adding it to the demo.

Back to Top

User Comments (0)

Post Your Comment
  You may post without logging in or login here.
Display Name: Required.
Email: Required. Will not be shown. Used for identicon.
Comment:
Allowed tags: <quote></quote>, <code></code>, <b></b>, <i></i>, <u></u>, <red></red>
 
   Please type text as shown in the image at left.