public void shuzu()
{
string[,] myArray;
myArray = new string[ ,] { {"Z","A","B","C","D","E","F","G","H","I"},
{"A","11","32","33","54","55","76","77","98","99"},
{"B","12","31","34","53","56","75","78","97","01"},
{"C","13","30","35","52","57","74","79","96","02"},
{"D","14","29","36","51","58","73","80","95","03"},
{"E","15","28","37","50","59","72","81","94","04"},
{"F","16","27","38","49","60","71","82","93","05"},
{"G","17","26","39","48","61","70","83","92","06"},
{"H","18","25","40","47","62","69","84","91","07"},
{"I","19","24","41","46","63","68","85","90","08"},
{"J","20","23","42","45","64","67","86","89","09"},
{"K","21","22","43","44","65","66","87","88","10"}};
try
{
for (int x = 0; x < 12;x++)
{
for (int y = 0; y <10; y++)
{
Response.Write(myArray[x, y] + " ");
}
Response.Write("<br>");
}
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
Random rdm = new Random();
for (int i = 0; i < 3; i++)
{
Response.Write("在验证码中产生的结果:" + myArray[rdm.Next(1, 12), rdm.Next(1, 10)]);
Response.Write("<br>");
}
//字母索引行
for (int j = 0; j < 10; j++)
{
Response.Write("列:" + myArray[0, j] + " ");
}
//字母索引列
Response.Write("<br>");
for (int j = 0; j < 12; j++)
{
Response.Write("行:" + myArray[j, 0] + " ");
}
}