Monday, July 13, 2020

TOP 100 Interview Questions and Answers for .NET Developer

Q.1 What is SOLID Principle 

Ans. In the Object-Oriented Programming (OOPS), SOLID is an acronym, introduced by Micheal Feather, for five Design principles used to make software design more understandable, flexible, and maintainable. These principles are a subset of many other principles promoted by Robert C. Martin.

There are Five SOLID Principles
1.Single Responsibility Principle (SRP).
2.Open-Closed Principle (OCP).
3.Liskov Substitution Principle (LSP).
4.Interface Segregation Principle (ISP).
5.Dependency Inversion Principle (DIP).

Q.2 What is boxing and unboxing 

Ans. Boxing and Unboxing in C# Programming
Boxing is a mechanism converting value type to object type 


int j = 123;
// The following line boxes i.
object o = j;


Unboxing is an explicit conversion from the type object to a value type or from an interface
type to a value type


int j = 123;      // a value type
object o = j;     // boxing
int k = (int)o;   // unboxing


Q.3 What is the difference between asp.net c# and mvc.?
ASP.NET framework is a part of .net platform for building, deploying and running
web applications. Now, we can develop a web application by using Asp.Net Web Form
and Asp.Net MVC. In this article, I am going to expose the main difference between
ASP.NET WebForms and ASP.NET MVC.
Difference between ASP.NET MVC and WebForms

Asp.Net Web Forms
Asp.Net MVC
Asp.Net Web Form follow a traditional
event-driven development model.
Asp.Net MVC is a lightweight and
follows MVC (Model, View, Controller)
pattern based development, model.
Asp.Net Web Form has server controls.
Asp.Net MVC has HTML helpers.
Asp.Net Web Form supports view state
for state management at the client-side.
Asp.Net MVC does not support
view state.
Asp.Net Web Form has file-based
URLs means file name exists in the
URLs must have its physical
existence.
Asp.Net MVC has route-based URLs
means URLs are divided into
controllers and actions and moreover
it is based on controller not on
physical file.
Asp.Net Web Form follows Web Forms
Syntax
Asp.Net MVC follow customizable
syntax (Razor as default)
In Asp.Net Web Form, Web Forms
(ASPX) i.e. views are tightly coupled
to Code behind(ASPX.CS) i.e. logic.
In Asp.Net MVC, Views and logic are
kept separately.
Asp.Net Web Form has Master Pages
for a consistent look and feels.
Asp.Net MVC has Layouts for a
consistent look and feels.
Asp.Net Web Form has User Controls
for code re-usability.
Asp.Net MVC has Partial Views for
code re-usability.
Asp.Net Web Form has built-in data
controls and best for rapid
development with powerful
data access.
Asp.Net MVC is lightweight, provide
full control over markup and support
many features that allow
fast & agile development. Hence it is
best for developing an interactive
web application with the latest
web standards.
Asp.Net Web Form is not Open Source.
Asp.Net Web MVC is an Open Source.









No comments:

Post a Comment

Rewrite whole Web Site System and Sub System with data migration to new system.

Can you please share me your skype id or whats up number for better communications  my skype id is - jitendra.tech  whats up - +919617741414...