Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static class InOut
- {
- //------------------------------------------------------------
- /** Skaito, analizuoja ir rašo į skirtingus failus.
- @param fv - duomenų failo vardas
- @param fvr - rezultatų failo vardas
- @param fa - analizės failo vardas */
- public static void Apdoroti(string fv, string fvr, string fa)
- {
- string[] lines = File.ReadAllLines(fv, Encoding.UTF8);
- using (var fr = File.CreateText(fvr))
- {
- using (var far = /* As esu gudrutis */ File.CreateText(fa))
- {
- foreach (string line in lines)
- {
- if (line.Length > 0)
- {
- string nauja = line;
- if (TaskUtils.BeKomentaru(line, out nauja))
- far.WriteLine(line);
- if (nauja.Length > 0)
- fr.WriteLine(nauja);
- }
- else
- fr.WriteLine(line);
- }
- }
- }
- }
- //------------------------------------------------------------
- static class InOut
- {
- public static void Apdoroti(string fv, string fvr, string fa)
- {
- string[] lines = File.ReadAllLines(fv, Encoding.UTF8);
- using (var fr = File.CreateText(fvr))
- {
- using (var far = / File.CreateText(fa))
- {
- foreach (string line in lines)
- {
- if (line.Length > 0)
- {
- string nauja = line;
- if (TaskUtils.BeKomentaru(line, out nauja))
- far.WriteLine(line);
- if (nauja.Length > 0)
- fr.WriteLine(nauja);
- }
- else
- fr.WriteLine(line);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement