C#.Net Interview Question

In this post,I will list mostly asked Interview Question in C#.Net

1. What is C#
C# is the most popular language for writing Microsoft .NET applications. C# provides the fast application development found in Visual Basic with the power of C++. Its syntax is similar to C++ syntax and follows most of the concept of OOPs like the following:

  • Abstraction
  • Encapsulation
  • Polymorphism
  • Inheritance

To know more about C# read the following article

Introduction to C#.Net
 
2. What is an Object
An object is conceptually a block of memory that has been allocated and configured according to the blueprint.A program may create several objects of the same class. Objects are also known as instances.

3. What is enum in C#?
An enum is a value type with a set of related named constants often referred to as an enumerator list. It is used to declare an enumeration.
To know more about enum read the following article,

Enum




4. What is the difference between constant and read only in c#?
Constant is declared with “const” keyword in C# which is also known immutable values which are known at compile time and does not change its values at run time.

Readonly is declared with “read-only” keyword in C# which is also known immutable values and are known at compile and runtime and do not change their values at runtime like in any function for the life of application till the application is running.
5. What is Managed or Unmanaged Code?

Managed Code

The code, which is developed inside .NET framework environment is known as managed code. This code is executed by CLR with the help of managed code execution. Any language that is written in .NET Framework is managed code.

Unmanaged Code

The code, which is developed outside .NET framework is called unmanaged code.
6. What is Boxing and Unboxing

Boxing:
Boxing refers to converting a value type data type to the object which is implemented by this value type. Boxing may be done implicitly.

Unboxing:
Unboxing is also a process which is used to extract the value type from the object or any implemented interface type.Unboxing has to be done explicit by code.

Summary

I hope you got an idea about C#.Net Interview Question.
I would like to have feedback from my blog readers.
Your valuable feedback, question, or comments about this article are always welcome.

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *
Email *
Website