SelectMany
Jasurbek Xasanboyev
static void Main(string[] args)
{
List<string> strList = new List<string>() { "Jasurbek", "Xasanboyev" };
var methodResult = strList.SelectMany(x => x).ToList();
foreach (var item in methodResult)
{
Console.Write(item + " ");
}
//Output: J a s u r b e k X a s a n b o y e v
} static void Main(string[] args)
{
List<string> strList = new List<string>() { "Jasurbek", "Xasanboyev" };
var methodResult = from res in strList
from ch in res
select ch;
foreach (var item in methodResult)
{
Console.Write(item + " ");
}
//Output: J a s u r b e k X a s a n b o y e v
}Last updated
Was this helpful?