I want to process the data block by block separately
Here is the text:
[Global]
asd
dsa
akl
ASd
[Test2]
bnmnb
hkhjk
tzutzi
Tzutzi
Tzitzi
[Test3]
5675
46546
464
564
56456
45645654
4565464
[other]
sdfsd
dsf
sdf
dsfs
And first I want the first block and process it than the second... etc..
private void textprocessing(string filename)
{
using (StreamReader sr1 = new StreamReader(filename))
{
string linetemp = "";
bool found = false;
int index = 0;
while ((linetemp=sr1.ReadLine())!=null)
{
if (found==true)
{
MessageBox.Show(linetemp);
break;
}
if (linetemp.Contains("["))
{
found = true;
}
else
{
found = false;
}
}
}
}