public string GetMsgID()
{
Random rand = new Random((int)DateTime.Now.Ticks);
string szRand = rand.Next(0, 9999).ToString().PadLeft(4, ‘0‘);
return string.Format("{0}{1}", DateTime.Now.ToString("yyyyMMddHHmmss"), szRand);
}
时间: 2024-10-12 21:38:59