ASP .NET Interview Questions (Part-4)

ASP .NET Framework widely uses C# Language for creating web applications and websites. The Concepts of this language are very important for ASP .NET Interview. So in this article, I will discuss some important concepts related to C#.
Let's now move towards the Questions.

Question # 1: What I Difference between Constants and Read-Only Variables?
Constant: It is necessary to initialize Constant Fields at the time of the Declaration. We can also declare Constant Fields in Methods.
Read-Only: Read-Only Fields could be initialized at the time of Declaration as well as in Constructor but they cannot be declared in methods.

Question # 2: What is Garbage Collector?
Garbage Collector is used to allocate the space to Objects in memory and to remove the Objects from memory when it is of no use. In this way, a lot of space remains available in memory.

Question # 3: What are Access Modifiers?
Access Modifiers defines the scope of the accessibility of public, private, internal, protected classes, methods, or other members.
Public: The members with the "public keyword" could be accessed anywhere.
Private: The members with the "private keyword" could only be accessed within the same class.
Internal: The members with the "internal keyword" could only be accessed within the project.
Protected: The members with the "protected keyword" could only be accessed in the child classes.

Question # 4: What are Delegates?
Delegates are the Pointers of the Functions. They are actually the Reference Type Variables that hold the memory address of the function. They are used for Call Back Methods and to implement Events.

Question # 5: What is Cohesion and Coupling?
Cohesion: Cohesion is the Degree of relatedness of the functions or members of the class with each other.
Coupling: Coupling is the Degree of Dependency of different Modules on each other.
It is desirable to Maximize Cohesion and Minimize Coupling in the code.

Here is the video where I explained these Questions in very Easy Words
Must Watch this video (In Urdu):

Posted: 16 May 2021

Visit for more

Joined in Nov 2020

I am Programmer, I love writing about technology. You can contact me for any suggestions & feedback about this website. Keep writing & reading awesome articles.


() ()