/// <summary> /// 创建随机数 /// </summary> /// <param name="num"></param> /// <returns></returns> private string CreateRandom(int num) { string str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; StringBuilder sb = new StringBuilder(); for (int i = 0; i < num; i++) { sb.Append(str[new Random(Guid.NewGuid().GetHashCode()).Next(0, str.Length - 1)]); } return sb.ToString();
}