hi,
help to generate string data randamlly, i have for numbers, i did not got any idea for string
just help me
Help me to generate a string randamlly
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Craig MurphyRank #2,956 · 488 reputationPosted Mar 19, 2006, 12:33 PM EST
string s = ""; int n; char c; Random r = new Random(); for (int i = 0; i < 10; i++)
{
n = r.Next(65, 65 + 26);
c = System.
Convert.ToChar(n);s = s + c;
}
//listBox1.Items.Add(s);Binu Subi68 reputationPosted Mar 20, 2006, 10:02 AM EST
It is easy as
System.Guid.NewGuid.ToString()
Cheers!