/// <summary>
/// 随机生成字符串
/// </summary>
/// <param name="codeCount">字符串个数</param>
/// <returns></returns>
private string GenerateCheckCode(int codeCount)
{
int number;
char code;
string checkCode = String.Empty;
System.Random random = new Random();
for(int i=0; i<codeCount; i++)
{
number = random.Next();
if(number % 2 == 0)
code = (char)('0' + (char)(number % 10));
else
code = (char)('A' + (char)(number % 26));
checkCode += code.ToString();
}
return checkCode;
}