Constructor for ExtendedRandom that accepts a seed value to generate with.
| C# | Visual Basic | Visual Basic Usage | Visual C++ | J# | JScript |
public ExtendedRandom( int seed )
Public Sub New ( _ seed As Integer _ )
Dim seed As Integer Dim instance As New ExtendedRandom(seed)
public: ExtendedRandom( int seed )
public ExtendedRandom( int seed )
public function ExtendedRandom( seed : int )
TenneySoftware.ExtendedFunctions.ExtendedRandom = function(seed);
- seed (Int32)
- Value to use for generation. A value of 0 will use default system time to generate with.
using System; using TenneySoftware; using TenneySoftware.ExtendedFunctions; namespace Library_Test { class Program { public static ExtendedRandom rnd = new ExtendedRandom(1000);// 1000 used as seed value. static void Main(string[] args) { Console.WriteLine("Seed: " + rnd.Seed); Console.WriteLine("Rnd: " + rnd.Next(100)); Console.Read(); /* Output: Seed: 1000 Rnd: 15 Output will always be that same for this seed value. */ } } }