Q1. What’s the advantage of using System.Text.StringBuilder over System.String?
Ans. 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.
Q2.What’s a satellite assembly?
Ans. 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.
Q3. Is it possible to inline assembly or IL in C# code?
Ans. No
Q4. Is it possible to have a static indexer in C#?
Ans. No, Static indexers are not allowed in C#.
Q5. Does C# support multiple-inheritance?
Ans. No.
Q6. Who is a protected class-level variable available to?
Ans. It is available to any sub-class (a class inheriting this class).
Q7. How can you sort the elements of the array in descending order?
Ans. By calling Sort() and then Reverse() methods.
Q8. Explain the three services model commonly know as a three-tier application.
Ans. Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).
Q9. Can multiple catch blocks be executed for a single try statement?
Ans. No. Once the proper catch block processed, control is transferred to the finally block (if there are any).
Q10. Will the finally block get executed if an exception has not occurred?
Ans. Yes.
Q11. Is it possible to have different access modifiers on the get/set methods of a property?
Ans. No. The access modifier on a property applies to both its get and set accessors. What you need to do if you want them to be different is make the property read-only (by only providing a get accessor) and create a private/internal set method that is separate from the property.
Q12. Can multiple catch blocks be executed?
Ans. 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.
Q13. What are the ways to deploy an assembly?
Ans. An MSI installer, a CAB archive, and XCOPY command.
Q14. What is the name of c#.net compiler?
Ans. CSC
Q15. what is the main difference between delegate and an event in c#?
Ans. Delegates and Events Both are related. Dalegete is a function pointer which can able to store the address of any function with same prototype.Event is a function handler which can handles or run the functions in same prototype of its delegate.For handling the events delegate is uesd.
No comments:
Post a Comment