Table of Contents

Class RandomStringGenerator

Namespace
Shift.Common
Assembly
Shift.Common.dll
public class RandomStringGenerator
Inheritance
RandomStringGenerator
Inherited Members
Extension Methods

Constructors

RandomStringGenerator(RandomStringType, int)

public RandomStringGenerator(RandomStringType valueType, int length)

Parameters

valueType RandomStringType
length int

Methods

Create(RandomStringType, int)

public static string Create(RandomStringType type, int length)

Parameters

type RandomStringType
length int

Returns

string

Create(int)

public static string Create(int length)

Parameters

length int

Returns

string

Create(Random, RandomStringType, int)

public static string Create(Random random, RandomStringType type, int length)

Parameters

random Random
type RandomStringType
length int

Returns

string

Create(Random, int)

public static string Create(Random random, int length)

Parameters

random Random
length int

Returns

string

CreatePasscode()

public static string CreatePasscode()

Returns

string

Remarks

Generates a passcode of the form "xxxx-xxxx-xxxx" where "x" is a character or a digit that cannot be easily confused with any other character or digit. For example, the digit "0" and the letter "O" are excluded because they can be easily confused with one another.

CreateUserPassword()

public static string CreateUserPassword()

Returns

string

Remarks

Generates a 12-character password, starting with 3 uppercase letters, followed by a symbol, 4 lowercase letters, and then 4 digits. The symbol is randomly selected from the set ".-!?$".

Next()

public string Next()

Returns

string