Web Analytics Made Easy -
StatCounter C# Byte array to String - CodingForum

Announcement

Collapse
No announcement yet.

C# Byte array to String

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • C# Byte array to String

    So yeah i managed to write a application which attaches to a process by window name and then i made a code which retrieves the value of a certain address (ptr) in memory. Its just when i convert the output bytes i get weird symbols. For example if the value the address holds is 250 it returns something different, not letters and not numbers, just some weird looking symbols.

    Question:
    The adr i declare like this:
    Code:
     uint adrChrHp = 0x0000000;
    Do i have to add the offset to this aswell, if so how can i do that.

  • #2
    You want to convert a byte array into something you can print out? You can do that using the ASCIIEncoding class. Look at the GetChars and GetString functions. To do the reverse look at GetBytes.
    OracleGuy

    Comment


    • #3
      Converting byte array to string and back again in C#
      Don't forget to mark solution providing post as "Answered".
      It helps others to find correct solutions!

      Comment

      Working...
      X