c# list to ienumerable code example
Example 1: convert list to ienumerable
List<Book> list = new List<Book>();
return list.AsEnumerable();
Example 2: c# ienumerable to list
List<object> list = enumerable.ToList();
List<Book> list = new List<Book>();
return list.AsEnumerable();
List<object> list = enumerable.ToList();