Hello everybody,
I am new to C# and .NET framework programming so hold your horses. I am trying to send some hex data to IO port (USB). I am able to send fixes data ( byte[] send = {0x01,0x01,0x80 }). Now I would like to convert string input from console to byte array. I was able to find some solutions but they are a little bit confusing for me. I need this now to manually control the device, later I will incorporate a CSVHelper to read from CSV file and write to a new one.
Solutions I have found are:
Split the string to string array, then parse that as int array, and parse that as byte. I am getting errors for that.
Second solution got me to use some other namespace but as I am new to C# and .NET I got totaly lost in it.
Can you help me?
I am new to C# and .NET framework programming so hold your horses. I am trying to send some hex data to IO port (USB). I am able to send fixes data ( byte[] send = {0x01,0x01,0x80 }). Now I would like to convert string input from console to byte array. I was able to find some solutions but they are a little bit confusing for me. I need this now to manually control the device, later I will incorporate a CSVHelper to read from CSV file and write to a new one.
Solutions I have found are:
Split the string to string array, then parse that as int array, and parse that as byte. I am getting errors for that.
Second solution got me to use some other namespace but as I am new to C# and .NET I got totaly lost in it.
Can you help me?