Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Char[] to string
Message
De
11/08/2005 06:43:35
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/08/2005 05:42:06
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01039893
Message ID:
01040134
Vues:
13
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform