Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string[] txt = new string[2000];
- OpenFileDialog ofd = new OpenFileDialog();
- SaveFileDialog sfd = new SaveFileDialog();
- if (ofd.ShowDialog() == DialogResult.OK)
- {
- if (sfd.ShowDialog() == DialogResult.OK) ;
- {
- FileStream fs1 = new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
- StreamReader sr = new StreamReader(fs1, Encoding.Default);
- FileStream fs2 = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write, FileShare.Write);
- StreamWriter sw = new StreamWriter(fs2, Encoding.Default);
- int i = 0;
- string zeile;
- while ((zeile = sr.ReadLine()) != null)
- txt[i++] = zeile;
- while (i > 0)
- sw.WriteLine(txt[--i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement