Home
31.
What's the difference between const and readonly?

You can initialize readonly variables to some runtime values. Let's say your program uses current date and time as one of the values that won't change. This way you declare public readonly string DateT = new DateTime().ToString().

32.
What happens when you encounter a continue statement inside the for loop?

The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.

33.
What's the advantage of using System.Text.StringBuilder over System.String?

StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it's being operated on, a new instance is created.

34.
Can multiple catch blocks be executed?

No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.

35.
What's a delegate?

A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.