Cambia Research - Supporting the Microsoft .NET Developer Community Supporting the Microsoft .NET Developer Community  

     | Home  | Articles  | Categories  | Coders  | Search  | Submit  | Contact Us    
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. -- Edsger Dijkstra

Share Your Knowledge! -- Create and submit your articles the easy way with WebWriter.

Updated:01:04 PM CT Feb 14, 2007
Posted:12:59 PM CT Feb 14, 2007

Online Random Number Generator

Including C# source code

Author: Steve Lautenschlager

Has DownloadsHas ImagesSnippetDataData TypesC#.NETASP.NETMathStatistics

 Downloads

Random Number Generator - 22.5 KB - 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. Go here for more on my RandomProvider class which is used to generate all the random numbers.

 Screen shot of Random Number Generator in the download above

 Copy and Paste Cleanly

Note that with the online tool or the download 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.

Add New Comment
CR Comments by Cambia Research
advertisement
 
Steve Lautenschlager (steve)
Steve is the founder and creator of Cambia Research. Developing and maintaining the site combines his passions for technology, writing and education.
Steve holds a Ph.D. in particle physics from Duke University, has worked at CERN, the European center for particle physics (where the web was born) and in Microsoft's web division with microsoft.com, msnbc.com and other web properties. Steve is a web consultant specializing in Microsoft.NET technologies. Read more here.


 
Copyright © Cambia Research 2002-2007. All Rights Reserved. steve [ at ] cambiaresearch.com