Check out example codes for "c# random string". It will help you in understanding the concepts better.

Code Example 1

private static Random random = new Random();
public static string RandomString(int length)
{
    const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    return new string(Enumerable.Repeat(chars, length)
      .Select(s => s[random.Next(s.Length)]).ToArray());
}

Code Example 2

Namespace: System.Web.Security
public string GeneratePassword()
{
	return Membership.GeneratePassword(10,1);
}

Learn ReactJs, React Native from akashmittal.com