Click or drag to resize
RandomStringIdentifier Method (IRandom, Int32, RandomStringCasing)
Generates a random string using only decimal digits and letters from the English alphabet, with the restriction that the first character cannot be a decimal digit.

Namespace: Experilous.MakeItRandom
Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version:
public static string Identifier(
	this IRandom random,
	int length,
	RandomStringCasing casing


Type: Experilous.MakeItRandomIRandom
The pseudo-random engine that will be used to generate bits from which the return value is derived.
Type: SystemInt32
The length of the string to be generated.
Type: Experilous.MakeItRandomRandomStringCasing
The letter casing used for English letters.

Return Value

Type: String
A random string which conforms to typical rules of valid identifier names in many programming languages.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandom. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also