Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Char[] to string
Message
From
11/08/2005 06:43:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/08/2005 05:42:06
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01039893
Message ID:
01040134
Views:
15
>Hi Cetin,
>
>you're right .. it returns "System.Char[]"
>
>conceptually mistaken in my opinion .. a char[] array object that can't be easily converted into a string ... , the reverse is possible:
>
>someString.ToCharArray() ..., so why not the other way around ... ???!!!
>
>I don't program much in C# .. and my example was not tested ..
>I don't know it if works in Net 2.0
>
>Regards
>Christian

Yes I agree with you. I too expected it to be as simple as:
charArray.ToString("someformatspecifierhere")

or even easier:
string myString = (string)charArray;
using System.Text;
//...
char[] ca = new char[] {'a','b','v'};
Encoding ascii = Encoding.ASCII;
string myStr = ascii.GetString( ascii.GetBytes( ca ));
Bothers me as well.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform