Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# generate unique key

/// <summary>
        /// Return uniquekey in Base64 string
        /// </summary>
        /// <returns></returns>
        public static string UniqueKey()
        {
            var tmp = Guid.NewGuid().ToString();
            var encode = Encoding.UTF8.GetBytes(tmp);
            return Convert.ToBase64String(encode);
        }
 
PREVIOUS NEXT
Tagged: #generate #unique #key
ADD COMMENT
Topic
Name
5+9 =