C# - AsEnumerable Example

前端 未结 9 1358
耶瑟儿~
耶瑟儿~ 2020-12-20 00:44

What is the exact use of AsEnumerable? Will it change non-enumerable collection to enumerable collection?.Please give me a simple example.

9条回答
  •  暖寄归人
    2020-12-20 00:48

    AsEnumerable can only be used on enumerable collections. It just changes the type of the collection to IEnumerable to access more easily the IEnumerable extensions.

提交回复
热议问题