Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String Manipulation
Message
De
28/06/2010 12:50:35
 
 
À
28/06/2010 12:41:49
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01470812
Message ID:
01470815
Vues:
92
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>I have a string like this:
>
>"LastName, FirstName, MiddleName"
>
>and sometimes it could just be this:
>
>"CompanyName"
>
>I want to add a string into these strings so they end up like this:
>
>"LastName DESC, FirstName DESC, MiddleName DESC"
>
>or:
>
>"CompanyName DESC"
>
>How would I do this in C#?

Basically this
			string s = "LastName, FirstName, MiddleName";

			s = s.Replace(",", " DESC,") + " DESC";
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform