享受代码,享受人生

SOA is an integration solution. SOA is message oriented first.
The Key character of SOA is loosely coupled. SOA is enriched
by creating composite apps.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

生成随机字符串

Posted on 2005-02-04 21:01  idior  阅读(930)  评论(2编辑  收藏  举报
private string GetRandomString(int maxLength) {
   
string randomString = null;
   Random rNumber 
= new Random(Environment.TickCount);
   
for(int i = 0; i < maxLength; i++
      randomString 
= randomString + Convert.ToChar(rNumber.Next(65,90));
   }

   
return randomString;
}