How to generate random letters and digits in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Guid.NewGuid().ToString().Replace("-", string.Empty).Substring(0, 9));
        }
    }
}


/*
run:
    
7058d1f5f

*/

 



answered Feb 15, 2017 by avibootz
...