Guest User

Untitled

a guest
Aug 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Read file from position
  2. FileStream infile = new FileStream(@"C:UsersJohnDesktopProjectNewnov.txt", FileMode.Open, FileAccess.Read);
  3. int position = x.Length;
  4. infile.Seek(position, SeekOrigin.Begin);
  5.  
  6. using (FileStream fs = new FileStream(@"file.txt", FileMode.Open, FileAccess.Read))
  7. {
  8. fs.Seek(100, SeekOrigin.Begin);
  9.  
  10. byte[] b = new byte[fs.Length - 100];
  11. fs.Read(b, 0, (int)(fs.Length - 100));
  12.  
  13. string s = System.Text.Encoding.UTF8.GetString(b);
  14. }
Add Comment
Please, Sign In to add comment