Type text here
1
// 2

/**//// 取得随机数 3
/// 4
/// 随机数的长度 5
/// 6
public static string getrandnum( int randnumlength ) 7


{ 8
system.random randnum = new system.random( unchecked( ( int ) datetime.now.ticks ) ); 9
stringbuilder sb = new stringbuilder( randnumlength ); 10
for ( int i = 0; i < randnumlength; i++ ) 11


{ 12
sb.append( randnum.next( 0, 9 ) ); 13
} 14
return sb.tostring(); 15
} 16

17
#endregion 18
