Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
From System.Collections.Generic.IEnumerable to string
Message
De
06/05/2015 04:22:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
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:
01619455
Vues:
32
J'aime (1)
>Anyone has an example of going from System.Collections.Generic.IEnumerable, of type String, to a string?

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()))
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform