Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Basic Interview Questions in C# (Part-3)

C# Interview Questions



13) Can we execute Multiple Catch blocks in C#?
We can use Multiple Catch block with single try block but multiple catch block don’t execute Once the Exception Occurred it will caught by specific catch block then comes out.

14) What is the difference between “finalize” and “finally” methods in C#?
 Finalize:-Finalize method is also know as destructor to the class. Finalize method can not be called explicitly in the code only Garbage collector can call it .It is used to released the memory of the object.
Finally:- Finally Block always execute irrespective whether the Exception occurred or not. When the exception occurred it goes to try block then goes to catch block and at last it goes to Final block. We use finally block to close the connection object or to released the file object memory.

15)  What is the index value of the first element in an array?
The index value of Array starts with 0 (Zero), increase by n+

16) What is use “finally” block in C#?
Finally Block always execute irrespective whether the Exception occurred or not. When the exception occurred it goes to try block then goes to catch block and at last it goes to Final block. We use finally block to close the connection object or to released the file object memory.

17)  What is a multicast delegate?
Delegate object to hold multiple references of and invoke multiple methods where as Delegate object holds reference to a single method. Such delegate objects are called multicast delegates or combinable delegates.

 18) Can you specify the access modifier for methods inside the interface?         
 No, we cannot specify the access modifier of method inside interface as by default method as public.

19) What are reference types in C#?
  • class
  • string
  • interface
  • object
20) Can you declare an overridden method to be static if the original method is not static?
No, Two virtual methods must have the same signature.


Kindly here to Follow me . See more interview question Click here





This post first appeared on Pivot In SQL Server, please read the originial post: here

Share the post

Basic Interview Questions in C# (Part-3)

×

Subscribe to Pivot In Sql Server

Get updates delivered right to your inbox!

Thank you for your subscription

×