You must Sign In to post a response.

convert system.byte[] to string

hi friends

i want to convert system.byte[] to string

plse see my code below
Dim c() As Byte
Dim d,appnum As String

appnum ="11250369"

c = System.Text.Encoding.UTF8.GetBytes(appnum)
d = Convert.ToString(c)

response.wrire(d)
response.end()


if wil give output as system.byte[]
but i need this output
0000JlIYTqkhCPltcKnYCJQbWAh:11n0o9sj1
for this 11250369 no.


Comments

Author: Pankaj Mishra04 Jul 2007 Member Level: Gold   Points : 2

Hi,
try like this

string str = System.Text.Encoding.ASCII.GetString(c); //replace c with your byte array .

Regards
Pankaj


Sign In to post your comments