I've written some code to generate a sequence of random characters, but it does not:
byte[] sbytes = { 1, 0, 1, 0, 1 };
String sstring;
System.Random r = new System.Random();
r.NextBytes(sbytes);
sstring = Convert.ToBase64String(sbytes);
sstring = Path.GetRandomFileName();
sstring = sstring.Replace("=", "");
sstring = sstring.Replace(".", "");
textBox1.Text = sstring.ToString();
I believe the problem is between NextBytes and ToBase64String. I don't know how to make this work. How do you do the correct conversion to pass it to a textbox for display?