Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chrtran in .NET
Message
De
22/02/2013 13:16:32
 
 
À
22/02/2013 13:07:49
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01360482
Message ID:
01566776
Vues:
51
Even better, make it an Extension method to the string class.

>
>Can be optimized in that case
>
>would be like this
>
>public static string ChrTran(this string s, string[]  from, string[] to)
>
>
>Of course - the length of the arrays from and to must be equal
>
>It's an extra loop. sb needs to be instantiated only once, and only once sb.ToString();
>
>
>Also, in the oiginal code above from and to are not checked for null values
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform