C#.Net Interview Question and Answers

1. What is C#?
 
  • C# (pronounced "C sharp") is a simple, modern, object-oriented, and type-safe programming language.
  • It will immediately be familiar to C and C++ programmers.
  • C# combines the high productivity of Rapid Application Development (RAD) languages.
 
Your Name Your Email-ID
Your Answer
2. What are the types of comment in C#?
 
    There are 3 types of comments in C#.
  • Single line (//)
  • Multi (/* */)
  • Page/XML Comments (///).
 
Your Name Your Email-ID
Your Answer
3. What are the namespaces used in C#.NET?
 
    Namespace is a logical grouping of class.
  • using System;
  • using System.Collections.Generic;
  • using System.Windows.Forms;
 
Lakshmi Narayanan, said May 13,2014
Using System.Data; Using System.Drawing; Using System.Text;
Lakshmi Narayanan, said May 13,2014
using System.IO; using System.Data; using System.Threading; using System.Management; using System.Collections
Your Name Your Email-ID
Your Answer
4. What are the characteristics of C#?
 
    There are several characteristics of C# are :
  • Simple
  • Type safe
  • Flexible
  • Object oriented
  • Compatible
  • Consistent
  • Interoperable
  • Modern
 
Your Name Your Email-ID
Your Answer
5. What are the different categories of inheritance?
 
  • Single inheritance : Contains one base class and one derived class.
  • Hierarchical inheritance : Contains one base class and multiple derived classes of the same base class.
  • Multilevel inheritance : Contains a class derived from a derived class.
  • Multiple inheritance : Contains several base classes and a derived class.
  • Hybrid inheritance : is nothing but a any combination of single,multiple and inheritance inheritance. Multiple inheritance class is not possible as it give assembly level error when we use the same name for method. Multiple inheritance in interface is possible.
 
Your Name Your Email-ID
Your Answer