How to prevent memory overflow when using an IEnumerable and Linq-To-Sql?

后端 未结 4 738
旧时难觅i
旧时难觅i 2021-01-16 02:53

This question is related to a previous question of mine

That\'s my current code

 IEnumerable Get()
 {
     while(//get implementation
           


        
4条回答
  •  情深已故
    2021-01-16 03:37

    For a neat way to get batches of items from an IEnumerable, see this:

    C#: Cleanest way to divide a string array into N instances N items long

    Update: No good, that works on arrays. If I have some time later and no one else has provided something, I'll write it up...

提交回复
热议问题