[Python] Can't reproduce one particular Python struct.pack result in C# [closed]

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    self.v5_controlcode = struct.pack("<H", 0x4510)


    The result is 'x10E'

    Most of the time in C#, I'm getting the same result as Python pack, but for this particular case I can't, and I can't figure out how 0x4510 ends up as 'x10E' with struct.pack.

    How to do the same same calculation in C#? From Unsigned integer 0x4510 to 0x10E?

    Continue reading...

Compartilhe esta Página