Answers for "convert ienumerable to list"

C#
2

convert ienumerable to list

using Linq;

IEnumerable<int> enumerable = Enumerable.Range(1, 300);
List<int> asList = enumerable.ToList();
Posted by: Guest on August-28-2020
0

convert list to ienumerable

List<Book> list = new List<Book>();
return list.AsEnumerable();
Posted by: Guest on August-04-2020
1

c# ienumerable to list

List<object> list = enumerable.ToList();
Posted by: Guest on March-12-2020

C# Answers by Framework

Browse Popular Code Answers by Language