string str = ""; Random rd = new Random(); for (int i = 0; i < 1000; i++) { str += "abcdefghij".Substring(rd.Next(10), 1); } Console.Write(str);
/// <summary> /// 提取 /// </summary> public static string TiQu_ZiMu(string Str) { Regex i; i = new Regex(@"[a-j]{1000}"); Match m; m = i.Match(Str); return m.ToString(); }
using System;class Program { static void Main() { Byte[] b = new Byte[1000]; new Random().NextBytes(b); for (int i = 0; i < b.Length; i++) b[i] = (byte)(b[i] % 10 + 'a'); char[] c = new char[b.Length]; Array.Copy(b, c, b.Length); string s = new string(c); Console.WriteLine(s); } }
Random rd = new Random();
for (int i = 0; i < 1000; i++)
{
str += "abcdefghij".Substring(rd.Next(10), 1);
}
Console.Write(str);
/// <summary>
/// 提取
/// </summary>
public static string TiQu_ZiMu(string Str)
{
Regex i;
i = new Regex(@"[a-j]{1000}");
Match m;
m = i.Match(Str);
return m.ToString();
}
{
static void Main()
{
Byte[] b = new Byte[1000];
new Random().NextBytes(b);
for (int i = 0; i < b.Length; i++)
b[i] = (byte)(b[i] % 10 + 'a');
char[] c = new char[b.Length];
Array.Copy(b, c, b.Length);
string s = new string(c);
Console.WriteLine(s);
}
}