- Home
- Interview Questions
- .NET
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().
The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
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.
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.
A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.