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])); }
377400cookie-checkC# generate url shortcode