Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a reorg for .NET Framework 4
Message
De
24/07/2010 14:02:17
 
 
À
24/07/2010 13:12:29
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01473537
Message ID:
01473703
Vues:
45
>>Actually, you're still needlessly jumping through hoops. Take a look at this:
>>
>>
>>string CRLF = "\r\n";
>>string TestString = string.Format("Test this string. {0}It contains {1}a CRLF.{2}QED", CRLF, CRLF, CRLF );
>>string[] lines = TestString.Split(CRLF.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
>>
>>for (int i = 0; i < lines.Length; i++)
>>{
>>	Debug.WriteLine(lines[i]);
>>}
>>
>Thanks, this is exactly what I was looking for.

Something odd here: In your original message as I see it there's a line that says:
"But, I would like to understand the use of .ToCharArray()." but it doesn't get reproduced in this reply ?

Anyway, FWIW, it does what is says on the box: Converts a string to an array of Char. eg:
char[] array = "This is a string".ToCharArray();
P.S to Bonnie : I hadn't clocked the StringSplitOptions enum till now :-{
P.P.S pre tags also don't work for me at the moment.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform