Skip to content

Instantly share code, notes, and snippets.

@wipiano
Last active July 30, 2017 08:55
Show Gist options
  • Save wipiano/18d28a738a0af9462a9d85ec05ffb050 to your computer and use it in GitHub Desktop.
Save wipiano/18d28a738a0af9462a9d85ec05ffb050 to your computer and use it in GitHub Desktop.
IEnumerable なのに LINQ が使えない!? 使えますよ! ref: http://qiita.com/wipiano/items/24991bfae6baba8dfbd4
// 非ジェネリックな IEnumerable
ArrayList services = new ArrayList() {"Qiita", "GitHub", "AWS", "Azure"};
// Cast<string>() で IEnumerable<string> にできる!
services.Cast<string>().Select(s => s.ToLower());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment