标签:summary ref generate rlock tostring random bsp 随机数 dom
#region 生成随机数 /// <summary> /// /// </summary> private static int iCount; /// <summary> /// 生成随机数 /// </summary> /// <returns></returns> public static string GenerateRandomNumber() { System.Threading.Interlocked.Increment(ref iCount); Random rnd = new Random(Guid.NewGuid().GetHashCode()); return iCount.ToString().PadRight(4, ‘0‘) + rnd.Next(1, 10000).ToString().PadLeft(4, ‘0‘); } #endregion
标签:summary ref generate rlock tostring random bsp 随机数 dom
原文地址:https://www.cnblogs.com/SmilePastaLi/p/9014951.html