Table of Contents

Class RandomStringHelper

Namespace
SunamoRandom
Assembly
SunamoRandom.dll

Provides easy-to-use random string generation for scenarios where other methods (like System.Web.Security.Membership.GeneratePassword) are not available.

public class RandomStringHelper
Inheritance
RandomStringHelper
Inherited Members
Extension Methods

Methods

RandomString(int, int)

Generates a random string of the specified length with a given number of non-alphanumeric (special) characters.

public static string RandomString(int length, int numberOfNonAlphanumericCharacters)

Parameters

length int

Total length of the generated string.

numberOfNonAlphanumericCharacters int

Number of special characters to include.

Returns

string

A random string containing both alphanumeric and special characters.