Answers for "how to run through a foreach loop a specific amount of times c#"

C#
0

c# run loop x times

foreach (var i in Enumerable.Range(0, N))
{
    // do something
}
Posted by: Guest on May-21-2021
0

c# loop through repeater items

foreach (RepeaterItem item in repeater.Items)
{
    if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
    {
        CheckBox chk = (CheckBox)item.FindControl("ckbActive");

        bool r = chk.Checked;
    }
}
Posted by: Guest on June-04-2020

Code answers related to "how to run through a foreach loop a specific amount of times c#"

C# Answers by Framework

Browse Popular Code Answers by Language