byte[] messageSend = Encoding.ASCII.GetBytes(">> Hello, it works !!!");
i chce to odczytac jako string, jak to zrobic ?
0
0
nvm
0
Ale gdzie to chcesz odczytać jako string
? Na drugiej stronie socketa? Domyślam się, bo naklepałeś messageSend
. Ogólnie, aby z tablicy byte
odczytać string
(jeżeli tablica zakodowana jest w ASCII) należy napisać:
string msgStr = Encoding.ASCII.GetString(messageSend);
I tyle.
0
Mhm, tak tez zrobilem :)