C# Binary

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shad0wX
    New Member
    • Nov 2008
    • 3

    #1

    C# Binary

    I'm, pretty good with C# but i cant figure out how to switch the first 44 bytes with the last 44 bytes of a file
  • joedeene
    Contributor
    • Jul 2008
    • 579

    #2
    Originally posted by Shad0wX
    I'm, pretty good with C# but i cant figure out how to switch the first 44 bytes with the last 44 bytes of a file
    Hello there, Shad0wX.

    Well, to start off I'd like to welcome you to the Bytes Community. I'd also, like to point you to the Posting Guidelines as you have posted a Homework Question it seems.

    Now to help out with the problem, I'm gonna ask a few questions first;

    1) Are you using the StreamReader and StreamWriter classes to open the file?

    2) Is the file binary, (as your title just says C# Binary)?

    Now, I'll suggest that you use Functions and Methods in the String Class to perform the actions you have requested, if you need further help, please ask and post a code sample of what you currently have. Thanks, and welcome again :)

    joedeene

    Comment

    • Shad0wX
      New Member
      • Nov 2008
      • 3

      #3
      Thanks, well its a bmp but i need to open like a hex editor would delete the last 4 bytes and swap the first 44 bytes with the last 44 bytes.

      I never have been any good with opening and editing bytes

      Comment

      • Shad0wX
        New Member
        • Nov 2008
        • 3

        #4
        Okay i got that working but is there a way to check if the last 4 bytes are 6D 70 2E 78

        Comment

        Working...