c# - How convert ToList method to LINQ expression -



c# - How convert ToList method to LINQ expression -

list<string> tolist(string[] names) { list<string> l = new list<string>(); foreach (string n in names) { l.add(n.toupper()); l.add(n.tolower()); } homecoming l; }

how convert tolist method linq expression(method syntax). help much appreciated. thanks.

names.selectmany(x => new[] { x.tolower(), x.toupper() }).tolist()

c# linq

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -