ITPub博客

首页 > 数据库 > 数据库开发技术 > 将手机号转化为由随机字母表示

将手机号转化为由随机字母表示

原创 数据库开发技术 作者:gavinlee 时间:2008-01-22 15:36:32 0 删除 编辑
static void Main(string[] args)
{
String word = "abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < 11; i++)
{
int a= getphone(getphone(i-1));
Console.Write(word.Substring(a,1));
}
}
//create random
static int getphone(int seed)
{
Random rand = new Random(seed);
int a = rand.Next(0, 25);
return a;
}[@more@]static void Main(string[] args)
{
String word = "abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < 11; i++)
{
int a= getphone(getphone(i-1));
Console.Write(word.Substring(a,1));
}
}
//create random
static int getphone(int seed)
{
Random rand = new Random(seed);
int a = rand.Next(0, 25);
return a;
}

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/310974/viewspace-998187/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    51
  • 访问量
    795696