C# Interview Questions And Answers

By: Interview | Views: 2180 | Date: 25-Mar-2011

Collection of C# Interview Questions & Answers which are being asked in most interview.

C# Interview Questions & Answers :

1.Does C# support multiple-inheritance?
No.

2.Who is a protected class-level variable available to?
It is available to any sub-class (a class inheriting this class).

3.Are private class-level variables inherited?

Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.

4.Describe the accessibility modifier “protected internal”.
It is available to classes that are within the same assembly and derived from the specified base class.

5.What’s the top .NET class that everything is derived from?
System.Object.

6.What does the term immutable mean?
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.

7.What’s the difference between System.String and System.Text.StringBuilder classes?
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

8.What’s the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.

9.Can you store multiple data types in System.Array?
No.

10.What’s the difference between the System.Array.CopyTo() and System.Array.Clone() ?
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identical object.

11.How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.

12.What’s the .NET collection class that allows an element to be accessed using a unique key?
HashTable.

13.What class is underneath the SortedList class?
A sorted HashTable.

14.Will the finally block get executed if an exception has not occurred?
Yes.

15.What’s the C# syntax to catch any possible exception?
A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.

16.Can multiple catch blocks be executed for a single try statement?
No. Once the proper catch block processed, control is transferred to the finally block (if there are any).

17.Explain the three services model commonly know as a three-tier application.
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).

Previous Page Next Page

People Searching On This Page:
  • c# interview questions pdf
  • medical representative interview questions and answers pdf
  • c# interview questions and answers
  • C# Programming Questions and Answers
  • c# questions
  • c sharp interview coding questions and answers
  • top 30 c# interview question answer
  • c # interview questions with answers uk
  • Latest .net with c# interview ques
  • c# interview questions with answers
  • c# interview questions
  • c#.net 3.5 interview questions and answers
  • c#.net interview question

Related Pages


Ford Fiesta Classic 1.6 Duratec Petrol Sxi Technical Specifications

Ford Fiesta Classic 1.6 Duratec Petrol Sxi Technical Specifications

Articles | Automotive | Cars
Date:
20-Jul-2012  Views: 4445

Ford is to launch news model like ford classic and it’s model ford classic will be available very earlier in market. Here we have provided Ford Fiesta ...
Car Accident Claim- Don’t pay any policy excess by using Easigo Car Accident Claim service.

Car Accident Claim- Don’t pay any policy excess by using Easigo Car Accident Claim service.

Articles | Finance | Insurance
Date:
31-Aug-2011  Views: 1454

If you have a car accident claim, call Easigo Accident Management, the best car accident claim company in the UK. ...
Car Accident ClaimCar Accident Claim

Car Accident ClaimCar Accident Claim

Articles | Finance | Insurance
Date:
08-Aug-2011  Views: 1086

If you need to make a car accident claim, call Easigo Accident Management, which is the best car accident claim company in the UK. ...
CAR ACCIDENT- HOW TO MAKE A SUCCESSFUL ACCIDENT CLAIM.

CAR ACCIDENT- HOW TO MAKE A SUCCESSFUL ACCIDENT CLAIM.

Articles | Finance | Insurance
Date:
30-Apr-2011  Views: 910

If you have had a car accident, In which you were not at fault, there are a number of points you should consider, when making an accident claim. Easig ...
Car Accidents Claims- Easigo Car Accident Claims Company are the best option!.

Car Accidents Claims- Easigo Car Accident Claims Company are the best option!.

Articles | Finance | Insurance
Date:
16-Apr-2011  Views: 1192

If you have had a car accident, which was not your fault, there are a number of points you should consider, when making a car accident compensation cl ...
Post Your Comments (No Login Require)
Name : (required)
Email : (required)
Website :

Comment : (required)

88  + 1 =     
Comments
People Searched About:
C# Interview Questions Pdf   |   Medical Representative Interview Questions And Answers Pdf   |   C# Interview Questions And Answers   |   C# Programming Questions And Answers   |   C# Questions   |   C Sharp Interview Coding Questions And Answers   |   Top 30 C# Interview Question Answer   |   C # Interview Questions With Answers Uk   |   C#.Net Interview Question   |  
Google : 702 times | Yahoo : 84 times | Bing : 347 times |