C# is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the .NET Framework. C# can be used to create traditional Windows client applications, distributed components, different applications and many more. C# became the most vital subjects or programming language for freshers. Their are lots of opportunity in C#. We have provided the important C# interview questions and answers asked during several interview and we have also attached the pdf .
1. What is C# ?
C# (pronounced “C sharp”) is a simple, modern, object-oriented, and type-safe programming language used with XML-based Web services on the .NET platform and designed for improving productivity in the development of Web applications. It will immediately be familiar to C and C++ programmers.
2. What are the types of comment in C#?
There are 3 different types of comments in C#.
- 1. Single Line Comment : The single line comment is specified using the symbol “//”
Eg: // this is a AbundantCode comment
- 2. Multi Line Comment :The Multiline comment can be specified using the symbol “/* */”
Eg: /* This is a test comment */
- 3. XML Comment:This is a special kind of comment which is generally used for API documentation. The symbol /// is used to specify the XML comment in C#
3. What are the namespaces used in C#.NET?
Namespace is a logical grouping of class.
4. What are the characteristics of C#?
Characteristics of C# :
- Object Oriented
- Type Safe
5. What are the different categories of inheritance?
In C# inheritance may be implemented in four categories :
- Single Inheritance
- Multilevel Inheritance
- Multiple Inheritance
- Hierarchical Inheritance
6. What are the basic concepts of object oriented programming?
The concepts used extensively in object oriented programming are :
- Data abstraction and encapsulation
- Dynamic Binding
- Message passing.
7. Can you inherit multiple interfaces?
Yes. Multiple interfaces may be inherited in C#.
8. What is a base class?
A base class is a class that is used to create, or derive other classes. Classes derived from a base class are called child classes, subclasses or derived classes. A base class does not inherit from any other class and is considered parent of a derived class.
9. What are the different types of statements supported in C#?
C# supports several different kinds of statements are
- Block statements
- Declaration statements
- Expression statements
- Selection statements
- Iteration statements
- Jump statements
- Try catch statements
- Checked and unchecked
10. What are the different types of Caching?
There are three types of Caching :
- Output Caching
- Fragment Caching
- Data Caching
Related Links :
Download Interview Questions and Answers on C#.pdf