>>26 * random.NextDouble()

a decimal value between 0 and 26

>>26 * random.NextDouble() + 65

a decimal value between 26 and 91

>>Math.Floor(26 * random.NextDouble() + 65)

just the integral portion of the previous value (still is decimal type)

>>Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))

previous value converted to an integral type

>>Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));

previous value converted to a character using the ASCII code

Result: a random character between 'A' and 'Z' (uppercase)

a decimal value between 0 and 26

>>26 * random.NextDouble() + 65

a decimal value between 26 and 91

>>Math.Floor(26 * random.NextDouble() + 65)

just the integral portion of the previous value (still is decimal type)

>>Convert.ToInt32(Math.Flo

previous value converted to an integral type

>>Convert.ToChar(Convert.T

previous value converted to a character using the ASCII code

Result: a random character between 'A' and 'Z' (uppercase)