Jump to content
Windows Dragon

Problemas com a conversão de byte array para string

Recommended Posts

Windows Dragon

Boas... Eu estou a ler um endereço de memoria que é um IP.

E estou a converter de byte array para string...

estou a ler 15 bytes

mas quando o IP não tem esses 15 bytes aparece-me quadrados e outras coisas estranhas como posso resolver esse problema?

string str;
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
str = enc.GetString(b_arrray9);
hostip.Content = str;

Este é o codigo que estou a utilizar para converter de byte array para string

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.