Is there any function equivalent to Python's struct.pack and struck.unpack in C# that allows me to pack and unpack values like this?
import socket
from struct import *
from collections import namedtuple
if __name__ == "__main__":
# set up params
command_type = 1
command_class = 5
command_code = 0x14
arg0 = 0
arg1 = 0
# encode params
packed_message = pack('
I have an array of type char which contains the same data which are at the top on the python code.
List (char message_Type, byte Command_Class, byte command_code,Int32 argument1, Int32 argument2) and I want to convert to bytes that respect the format present in pack and unpack function and the sum method
Example array
('1', 1, 0x22, 1 , 0)
Sachin SinghPosted Jan 28, 2021, 2:16 PM