Generate String with Get Random File Name - CSharp System

CSharp examples for System:Random

Description

Generate String with Get Random File Name

Demo Code


using System.IO;/*from www.ja  va 2  s .c  o m*/
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;

public class Main{
        public static string GenerateString()
		{
			string randString = Path.GetRandomFileName(); //GetRandomFileName is limited to 11 char lenght
			randString = randString.Replace(".", "");
			return randString;
		}
}

Related Tutorials