Monday, 27 January 2020

.Net interview questions for 2 years experience

Hi guys,
As per my own experience, I am also attending the interview questions. I am going to share interview questions for .net having experience of 2 years.
First of all, I have listed out the list of questions, after it i will explain in detail.
1. What's class.
Ans: class is like a blueprint of a specific object and it defines the kinds of data and the functionality their objects will have. It enables you to create your own custom types by grouping together variables of other types, methods and events. In C#, a class can be defined by using the class keyword.Example: Suppose we are going to write a program to create a calculator for some calculation.We required some variable to store the value.We required some variables to show the value.Now there will be a chances to declare more than one variable and function. And these are all variable and function grouping in one memory called class. The all functionality is for calculating something so we can give a class name Calculator.

2. What's is oops concepts.
Ans: The Oops concept is the root of the c#. The concept is a containing of four feature called 
        1. Polymorphisms
        2. Abstractions
        3. Inheritance
        4. Encapsulation

These all have a such like feature coating which is make C# stronger.

3. Explain encapsulation with example.
Ans: Encapsulation is a part of the oops concept of the c#. Encapsulation is a way to hide the member of the class from outer side access.

Let's take an example,
In touch screen mobile there is a feature of unlocking the mobile through the fingerprints. Just I have to put the finger on the scanner sensor of the mobile and it get unlock. This means there is some internal feature that gets the data from finger , scan, and checks and gives output you are the owner of this mobile or not. and these internal features not showing the user.

So encapsulation means hiding the important features of a class which is not been needed to be exposed outside of a class and exposing only the necessary things of a class.

4. What is the role of polymorphism?
Ans. Polymorphism is a part of the opps concept of the c#. Polymorphism means many forms.

Let's take an example,
In iPhone mobile, there is a single  button at the bottom in the center for working almost all work from those button-like, enter, back, lock, unlock, etc, 
So you can under there be a common function name with the different parameters make function to define in the many forms.


5. Where we can use inheritance.
Ans. Inheritance is part of the oops concept of the c#. Inheritance is a way to we can reuse the function of the class.

Let's an example.
Commonly the property of my parents hand over by me, and my property is hand over to my child, this property is hand over to his child, which means there is single property use by many.

----------------------------------------------------------------------------------------------------------------------
Thanks for reading 😊
You can ask your question on Instagram @akhilesh_vis17 and join my channel https://t.me/akhifamily To get the latest update on blogs

If you have any doubt or query you can just ask in comments

No comments:

Post a Comment

How to print Specific area and avoid the some area in javascript

Hi, guys below are an example to print a specific area in javascript, also you can hide the specific area. Example: <html> <b...