Friday, July 5, 2013

Interview Questions

1.  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.

2. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
      The first one performs a deep copy of the array, the second one is shallow.

3.  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.

4.  What’s a satellite assembly?
      When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.