1.結構
類 public class GetMethods{...}
類中的變量:
GetStr() GetStrAndNum()
類 public class GetString{...}
類中的變量:
類中的方法:
2.代碼
第類 public class GetMethods{...}
:該類中的方法來自:http://www.cnblogs.com/xiachufeng/archive/2012/04/01/2429065.html
codeCount= rep = str = num2 = DateTime.Now.Ticks + rep++ Random random = Random((()((()num2) & )) | (()(num2 >> ( i = ; i < codeCount; i++ num = str = str + (()( + (()(num % str = num2 = DateTime.Now.Ticks + rep++ Random random = Random((()((()num2) & )) | (()(num2 >> ( i = ; i < codeCount; i++ num = str = str + (()( + (()(num % str = num2 = DateTime.Now.Ticks + rep++ Random random = Random((()((()num2) & )) | (()(num2 >> ( i = ; i < codeCount; i++ num = ((num % ) == ch = ()( + (()(num % ch = ()( + (()(num % str = str + }
2)第類 public class GetString{...}
GetRandomCode(Code codeType, GetMethods getMethod= getMethod.codeCount = addMethod = ()addMethod.Invoke(getMethod, GetMethods getMethod= addMethod = ()addMethod.Invoke(getMethod, [] methods = { , , methods[( }
using StringControl;///代碼省略
//.....................
///代碼省略
//使用方法
RandomKey = GetString.GetRandomCode(GetString.Code.StrAndNum,);
RandomKey1 = GetString.GetRandomCode(GetString.Code.StrAndNum); //4位
///代碼省略
//.....................
///代碼省略
4.下載
5.總結