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 | |
Array.CopyTo() performs a deep copy of the array Array.Clone() copies the arraya strusture without data. | |
By calling Sort() and then Reverse() methods. | |
HashTable. | |
A sorted HashTable. | |
Yes. | |
A catch block that catches the exception of type System.Exception | |
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. | |
At that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project. | |
C# Interview Questions and Answers
Posted by
Ramu
Labels:
C# FAQ's