tagged [loops]

Can you enumerate a collection in C# out of order?

Can you enumerate a collection in C# out of order? Is there a way to use a `foreach` loop to iterate through a collection backwards or in a completely random order?

31 Oct at 19:25

How do I connect to a database and loop over a recordset in C#?

How do I connect to a database and loop over a recordset in C#? What's the simplest way to connect and query a database for a set of records in C#?

7 Dec at 23:45

C#: Looping through lines of multiline string

C#: Looping through lines of multiline string What is a good way to loop through each line of a multiline string without using much more memory (for example without splitting it into an array)?

30 Sep at 19:35

C# Should I Loop until no exception?

C# Should I Loop until no exception? I want to go once through a loop but only if an exception is thrown go back through the loop. How would I write this in C#? Thanks

24 Oct at 23:44

How do you create different variable names while in a loop?

How do you create different variable names while in a loop? For example purposes... So I end up with string1, string2, string3... all equaling "Hello"

22 Dec at 06:32

How to Iterate over a Set/HashSet without an Iterator?

How to Iterate over a Set/HashSet without an Iterator? How can I iterate over a `Set`/`HashSet` without the following?

13 Feb at 15:9

how do I create an infinite loop in JavaScript

how do I create an infinite loop in JavaScript I want to create an infinite loop in JavaScript. What are some ways to achieve this: eg ``` for (var i=0; i

27 Jul at 02:48

Repeating a function every few seconds

Repeating a function every few seconds I want to repeat a function from the moment the program opens until it closes every few seconds. What would be the best way to do this in C#?

11 May at 15:53

How to loop through a HashMap in JSP?

How to loop through a HashMap in JSP? How can I loop through a `HashMap` in JSP?

18 Nov at 18:49

Are the limits of for loops calculated once or with each loop?

Are the limits of for loops calculated once or with each loop? Is the limit in the following loop (12332*324234) calculated once or every time the loop runs? ``` for(int i=0; i

31 Jul at 00:1