Quantcast
Viewing all articles
Browse latest Browse all 15088

VS 2010 Encoding bytes into string

Dear friends!

In my case there is a device that outputs data stream in binary form.
I want to recode binary data into Unicode strings.
To do this, I wrote the following code:

Dim binData as Byte

AxWinsock1.GetData(binData)

System.Text.Encoding.Unicode.GetString(binData)

This code returns an error:

Unable to convert value of type "Byte" to one-dimensional array from Byte.

Can anyone kindly take me to unerstanding the essence of the issue?

Faithfully yours.

Viewing all articles
Browse latest Browse all 15088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>