Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
From System.Collections.Generic.IEnumerable to string
Message
De
05/05/2015 20:19:10
 
 
À
05/05/2015 16:22:38
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01619437
Message ID:
01619450
Vues:
29
J'aime (2)
>Anyone has an example of going from System.Collections.Generic.IEnumerable, of type String, to a string?

Hi!

Set the Seperator variable to whatever you want and you should be good to go!
Dim TestList As New List(Of String) From {"1", "2", "3", "4", "5"}
Dim Seperator As String = ", "
Dim Result As String = String.Join(Seperator, TestList.ToArray())
'Result = "1, 2, 3, 4, 5"
Sarosh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform