Code: Select all
> string number207 = FindTextBetweenWithout(fileTTT, "\n207 ", " 20");
> string number208 = FindTextBetweenWithout(fileTTT, "\n208 ", " 20");
> string number209 = FindTextBetweenWithout(fileTTT, "\n209 ", " 20");
> string number219 = FindTextBetweenWithout(fileTTT, "\n219 ", " 20");
Code: Select all
>207
>208
>209
>1402
>132
Code: Select all
var listChrt = File.ReadAllText(textBox2.Text);
Code: Select all
string compare()
{
if (listChrt.Contains("207"))
{
return number207;
}
if (listChrt.Contains("208"))
{
return number208;
}
if (listChrt.Contains("1402"))
{
return number1402;
}
return " ";
}
Code: Select all
richTextBox1.Text = (
dss()
);
Wie ich verstanden habe, endet die if else-Anweisung, wenn sie wahr ist, aber ich brauche etwas zum Iterieren Durchsuche meine gesamte Textdatei und vergleiche die Suche mit meinen vorhandenen Variablen (Zeichenfolge Nummer 207,208 usw.)