Código:
#SAP1
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
#SAP2
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRR
#SAP3
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRR
¿---------------------?
RRRRRRRRRRRRRRRR
Código
Encoding enc = System.Text.Encoding.UTF8; IEnumerable<string> textLines = System.IO.File.ReadLines(ra, enc); foreach (string o in textLines) { if (o.StartsWith("#")) { if (lb!= 0) { ccpr[lb- 1] = aux2.ToString(); } aux2 = 0; nlb[lb] = o; lb++; } else { arr.Add(o); cc++; } if (cc % 2 == 0 && cc != 0) { pg++; aux2++; } }