Get per 20 items from list and iterate in c#

            int myCount = 0;

            while (myCount < ssummarys.Count)
           {
                var twentyItems = ssummarys.Skip(myCount).Take(20);
                foreach (SSUMMARY ssummary in twentyItems)
                {
                     #region Do something
                     #endregion                    
                }
               
                myCount = myCount + 20;
            }

Comments

Popular posts from this blog

Provision AWS EC2 Instance and RDS with Terraform, and Deploy Spring Boot App to EC2 Instance via GitHub Action Pipeline

JQuery UI Autocomplete, custom HTML structure for result?

Easy Ui Jquery easyui-textbox change onChange event