C# Random ToString
Description
Random ToString
returns a string that represents the
current object.
Syntax
Random.ToString
has the following syntax.
public virtual string ToString()
Returns
Random.ToString
method returns A string that represents the current object.
Example
The following example shows how to use Random.ToString
method.
//w ww . j av a 2 s . co m
using System;
public class MainClass
{
static void Main()
{
Random randObj = new Random(1);
Console.WriteLine(randObj.ToString());
}
}
The code above generates the following result.