Convert string in byte array
-
Hi, I have an asp.net application, I have some text (or string) which I want to convert in to byte array. which is the best performance oriented approach. Please give me your advice or any link would be greatly helpfull. Thanks in advance.
Thanks & Regards, Abdul Aleem Mohammad St Louis MO - USA
-
Hi, I have an asp.net application, I have some text (or string) which I want to convert in to byte array. which is the best performance oriented approach. Please give me your advice or any link would be greatly helpfull. Thanks in advance.
Thanks & Regards, Abdul Aleem Mohammad St Louis MO - USA
indian143 wrote:
I want to convert in to byte array
GetBytes(yourString);
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
-
indian143 wrote:
I want to convert in to byte array
GetBytes(yourString);
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
And where are the implementation of GetBytes?? :^)
-
And where are the implementation of GetBytes?? :^)
System.Text.Encoding.GetBytes()
"It's not what you don't know that will hurt you the most, it's what you think you know that isn't so." - Unknown
-
indian143 wrote:
I want to convert in to byte array
GetBytes(yourString);
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding(); Byte[] bytes = encoding.GetBytes(yourString);
- Happy Coding - Vishal Vashishta