STRING TO HEX how to add in a vector ob bytes?

前端 未结 4 1613
一整个雨季
一整个雨季 2020-12-22 15:50

I have the following code:

string s =   \"2563MNBJP89256666666685755854\";
            Byte[] bytes = encoding.GetBytes(s);
            string hex = \"\";
           


        
4条回答
  •  暖寄归人
    2020-12-22 16:09

    For C# you could try

    System.Text.ASCIIEncoding  encoding=new System.Text.ASCIIEncoding();
    Byte[] bytes = encoding.GetBytes(strVar);//strVar is the string variable
    

提交回复
热议问题