Forums » .NET » .NET »

convert system.byte[] to string


Posted Date: 04 Jul 2007      Posted By:: Yasotha.P     Member Level: Gold    Member Rank: 0     Points: 2   Responses: 1



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.




Responses

#134500    Author: Pankaj Mishra      Member Level: Gold      Member Rank: 53     Date: 04/Jul/2007   Rating: 2 out of 52 out of 5     Points: 2

Hi,
try like this

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

Regards
Pankaj

Regards,
Pankaj


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Return to Discussion Forum
Start new thread

Subscribe to Subscribers
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India