随机字符串 hash
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] data = System.Text.Encoding.ASCII.GetBytes(Value); data = x.ComputeHash(data); string ret = ""; for (int i = 0; i < data.Length; i++) ret += data[i].ToString("x2").ToLower(); Console.WriteLine(ret);
参考:http://support.microsoft.com/kb/307020/zh-cn
格式化信息:http://msdn.microsoft.com/zh-cn/library/26etazsy.aspx#FormatStrings
日期格式化信息:http://msdn.microsoft.com/zh-cn/library/system.globalization.datetimeformatinfo.aspx
数字格式化信息:http://msdn.microsoft.com/zh-cn/library/system.globalization.numberformatinfo.aspx