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.
 
Vijay Singh, says March 19, 2018
C# is a simple & powerful object-oriented programming language developed by Microsoft.
Sanu Palata, says Feb 28, 2018
C# is a powerful and flexible programming language. It was developed by Microsoft and it can be used to create a variety of applications.
Rani, says Jan 29, 2018
C# (pronounced "C sharp") is a simple, modern, object-oriented, and type-safe programming language.
Rajshree, says August 13,2017
C# is a simple, Modern,Type safe, Object oriented programming language that enables programmers to quickly and easily build Microsoft.Net Applications.
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