Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
From System.Collections.Generic.IEnumerable to string
Message
De
06/05/2015 08:17:58
 
 
À
06/05/2015 04:22:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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:
01619460
Vues:
25
>Use String.Join() method as Sarosh already said. It doesn't need to be an array though and it works with IEnumerable. ie:
>
>
>dim myString = String.Join(",", myStringList)
>
>
>If it were a collection of some other type, you could still do that using ToString() method in between:
>
>Dim myList = {1, 2, 3, 4, 5}
>Dim Result = String.Join(",", myList.Select(Function(f) f.ToString()))
>
Thanks, but I am still wondering if this would work when the separator is not known.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform