Var specialLength = (int)Math.Ceiling(length / 4d) Public static string RandomString(int length) public static Random random = new Random() Note the Random is a global static variable. Take random characters from the concatenated array for the required length.Random numerical characters for the required length divided by 2.Random uppercase characters for the required length divided by 3.Random lowercase characters for the required length divided by 3.
0 Comments
Leave a Reply. |