I want to make an application includes one Text box, and 2 button , user can
"Jon Skeet [C# MVP]" wrote:
> [Yosi] <Yosi@discussions.microsoft.com> wrote:
> > I want to see "4.1", I successfuly do that:
> > Byte[] buffer = new Byte[stR.Length];
> > for(int j=0;j<stR.Length;j++)
> > {
> > buffer[j]=Convert.ToByte(stR[j]);
> > }
> > string clientcommand = System.Text.Encoding.Unicode.GetString(buffer);
> >
> > ****but I cant do the other way :
> > string str = "String to convert"
> > string unicodestring = str.Convert to Unicode ??????
>
> Why would you get 4.1 from "\x08\x03\x34\0.\0\x39\0"?
>
> The above is:
>
> Backspace
> ETX (not even sure what that is)
> 4
> NUL
> ..
> NUL
> 9
> NUL
>
> I think it would help if you started right from the beginning, and told
> us what your original data is, where you get it from, and what you want
> to do with it.
>
> --
> Jon Skeet - <skeet@pobox.com>
>
http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too