As already stated GUIDs are designed to be unique and not to be random. A better and rather simple way to generate a "random" string (i.e. meeting certain statistical requirements for randomness) would be to use Random:
///
/// Generates a random string with the given length
///
/// Size of the string
/// If true, generate lowercase string
/// Random string
private string RandomString(int size, bool lowerCase)
{
StringBuilder builder = new StringBuilder();
Random random = new Random();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
if (lowerCase)
return builder.ToString().ToLower();
return builder.ToString();
}
If you need "more secure" random numbers you might want to check out RNGCryptoServiceProvider. But as already John von Neumann said:
Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin.