Home » Jobs » c sharp interview questions and answers

What is CSHARP?
C# (pronounced “see sharp”) is a one of Dot Net programming language and supports functional, generic, object-oriented (class-based), and component-oriented programming disciplines.
Microsoft has introduced C# on June 2000 and updating/Introducing new features with different versions.
The most recent version is C# 4.0, which was released in April 12, 2010.

Explain different C# Types used to create a csharp program?
Basically c# compiler supplies intrinsic data types (int, double, string etc) and programmers can define user defined data types(class, struct, enum etc).
All above C# types fall into any one of the following categories

  • Value types
  • Reference types

Explain Value type and reference type?
Value Type
Variables of value types directly contain their data.
Value types store in stack.
Reference Type
Variables of reference types store references to their data
Reference types store in Heap Memory.

Tell me the three important Object Oriented programming features supported by C sharp?

  1. Encapsulation
  2. Inheritance
  3. Polymorphism

Could you able to apply inheritance to structure type in C#?
No, we could not apply inheritance to structure. Structure types are always sealed.

What are the main features involved in C#2.0 Version?
C# Generics and Iterators has come in C# 2.0 version with these features C# Collections has great benefits. Some of the other features are mentioned below

  • Partial Classes
  • Anonymous Methods
  • Nullable Types
  • CoVarience and Contra Varience in Delegates

Could remember some of the new features included in C#3.0 Version?
C# 3.0 has following good features and these features works with Visual studio 2008.

  • Object and Collection Initializers
  • Implicitly Typed Local Variables
  • Implicitly Typed Arrays
  • Extension Methods
  • Lambda Expressions
  • Anonymous Types
  • Query Expressions(LINQ)
  • Automatically Implemented Properties

What are the new features included in C#4.0 version?
C# 4.0 has released recently in 2010 and all these features could work with visual studio 2010 because VS2010 can be targeted to .net framework 4.0 version. C# 4.0 mainly focused on dynamic programming and contains following features.
Dynamic Binding
Name and optional Arguments
Improvements in CoVarience and ContraVarience
COM specific interop features

Related Posts with Thumbnails

No comments yet... Be the first to leave a reply!