SHARE
TWEET

Untitled

a guest May 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MarkFinder
  2.     {
  3.         private byte[] fileArr;
  4.         private string mark;
  5.         public MarkFinder(byte[] tab, string marker)
  6.         {
  7.             fileArr = tab;
  8.             mark = marker;
  9.         }
  10.  
  11.         public int FindMark()
  12.         {
  13.             for(int i=0;i<fileArr.Length-1;i++)
  14.             {
  15.                 if (fileArr[i].ToString("X") == "FF" && fileArr[i + 1].ToString("X") == mark)
  16.                     return i + 1;
  17.             }
  18.             return -1;
  19.         }
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top