C# generate url shortcode

Date: 2020-06-16
public static string GetUrlShortCode()
{
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.~!*";
	var rand = new Random();
	return string.Concat(Enumerable.Range(0, 5).Select(x => rand.Next(0, chars.Length - 1)).Select(x => chars[x]));
}
37740cookie-checkC# generate url shortcode