Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
Bonsai Boy of New York Bonsai Trees and Accessories

BlueHost Web Hosting

Liquid Web iThemes WordPress Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

DreamHost Web Hosting


Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Liquid Web Cloud VPS Hosting

10,936 questions

14,844 answers

573 users

How to generate random lowercase string in C#

1 Answer

0 votes
using System;
using System.Text;  

class Program
{
    static string random_lowercase_string(int len) {  
        StringBuilder sb = new StringBuilder();  
        Random random = new Random();  
        char ch;  
        for (int i = 0; i < len; i++) {  
            ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 97)));  
            sb.Append(ch);  
        }  
        return sb.ToString();  
    } 
    static void Main()
    {
        Console.Write(random_lowercase_string(10));
    }
}


/*
run:

vcqveomebi

*/

 




answered May 15 by avibootz
...