私はこれを行うのに苦労しています.
私はこれを持っています:
int counter = 0;
string line;
System.IO.StreamReader file = new System.IO.StreamReader(@"myfile.txt");
WebClient testador = new WebClient();
while ((line = file.ReadLine()) != null)
{
string[] campos = line.Split(':');
counter++;
}
file.Close();
私は彼がcampos[0]の単語を取得する必要があります。campos[0] = りんご
この単語を他のファイル .txt (例: myfile2.txt) で検索し、次の 10 文字をコピーします。
繰り返しますが、私の英語で申し訳ありません。
EDIT¹: まず、myfile.txt でテキストを取得します。例: MyFile.txt の 1 行目は: "apple:yeah:test" を使用します string[] campos = line.Split(':'), to Separe, campos[ 0] = apple, now.. myfile2.txt で apple を検索し、そこから次の 10 文字をコピーする必要があります。
みんなありがとう。:D