Dot Net Interview Questions for Freshers and Experience

Know the latest .net versions and Framework :

18 companies
Not as definition but with example is must.
1) What are the versions in .net?
A)
.Net Framework Version
CLR Version
Feature
year
.Net 4.6.2
4
Cryptographic reports, WPF and  windows forms to UWP
2016
.Net 4.6.1
4
Encrypting data in ADO.NET

2016
.Net 4.6
4
Asp.Net Core 5, Compilation using .net native, Event tracing
2015
.Net 4.5.2
4
New API’s
2015
.Net 4.5.1
4
Windows Phone Stores
2013
.Net 4.5
4
WPF,WCF,WF, ASP.NET
2012
.Net 4
4
Expended base class libraries, Cross platform development, MEF(Managed Extensibility Framework)
2010
3.5
2.0
AJAX enabled erbsites,LINQ,Dynamic data
2008
3.0
2.0
WPF,WCF ,WF ( Workflow Foundation),CardSpace
2008
2.0
2.0
Generics ,Asp.Net added
2005
1.1
1.1
Asp.net and Ado.net updated
2003
1.0
1.0
Windows Forms
2002

2) What is partial class? What is the difference between Public and private class?
Public
Private
1)A Class which can access throughout the application under its namespace
1)A Class(Private Constructor) which cannot be used outside the class can implement interface
2)Can show outside
2)can have Public Interface.
3) The type or member can be accessed by any other code in the same assembly or another assembly that references it.
3) The type or member can be accessed only by code in the same class or struct.

Partial Classes and Methods (C# Programming Guide) Visual Studio 2015. It is possible to split the definition of a class or a struct, an interface or a method over two or more source files. Each source file contains a section of the type or method definition, and all parts are combined when the application is compiled.

What is webservices?
A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. XML is used to encode all communications to a web service. For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response.

3) What is API?
Application program interface (API) is a set of routines, protocols, and tools for building software applications. An API specifies how software components should interact and APIs are used when programming graphical user interface (GUI) components.

4)What is constant menthod and extention methiod?
A) int func_that_does_not_modify_this(int arg) const {}
Placing const at the end of the function prevents you from accidentally modifying any of the internal properties, and lets the caller know that this function won't modify the object.
Is there a concept like this in C#?
Extension. An extension method has simplified calling syntax. It represents a static method as an instance method. Extension methods can lead to simpler syntax.
This keyword. An extension method uses the this-keyword in its parameter list. It must be located in a static class. We often use special "Extensions" classes.
An example. Here is a custom extension method. Usually you will want to store your extension method class in a separate source file (like ExtensionMethods.cs) in the project.

5)What difference bw stack and class?
In .NET, there are two categories of types, reference types and value types.
Structs are value types and classes are reference types.
The general difference is that a reference type lives on the heap, and a value type lives inline, that is, wherever it is your variable or field is defined.
A variable containing a value type contains the entire value type value. For a struct, that means that the variable contains the entire struct, with all its fields.
A variable containing a reference type contains a pointer, or a reference to somewhere else in memory where the actual value resides.

6) What is abstract and interface?
Abstract class
Interface
1) Abstract class can have abstract and non-abstract methods.
Interface can have only abstract methods.
2) Abstract class doesn't support multiple inheritance.
Interface supports multiple inheritance.
3) Abstract class can have final, non-final, static and non-static variables.
Interface has only static and final variables.
4) Abstract class can have static methods, main method and constructor.
Interface can't have static methods, main method or constructor.
5) Abstract class can provide the implementation of interface.
Interface can't provide the implementation of abstract class.
6) The abstract keyword is used to declare abstract class.
The interface keyword is used to declare interface.
7) Example:
public abstract class Shape{
public abstract void draw();
}
Example:
public interface Drawable{
void draw();
}

7)What is angular js ?
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write.













7.1)Project life cycle :

Image result for .net project life cycle
8) What are win forms?
A.navigation, search. This API is a part of .NET Framework 3.0. Windows Forms (Win Forms) is a graphical (GUI) class library included as a part of Microsoft .NET Framework, providing a platform to write rich client applications for desktop, laptop, and tablet PCs.

1) Primitive and no primitive data types?
A) 1.   primitive types (or) predefined
Ex:  byte, short, int, float, double, long ,char, bool, DateTime, string, object etc..
2.   non-primitive types (or) User Defined
Ex: class , struct , enum , interface,  delegate, array.
struct , enum are Value Types
class, interface, delegate, string, object and array  are referral types.
2) Single-tire ,N-tire ,Multi-tire
A) N-Layer, what should be the minimum value for N?

It's a best practice to have at least three layers in a system.
Layer 1 - Presentation Layer - Which contains you UI.
Layer 2 - Business Domain - Which contain Business Logic.
Layer 3 - Database Access layer


3-tier architecture is general architecture in software development and it consists of
Presentation layer (client browser)
Application or Business logic layer
Data Layer
N-tier architecture in .Net
enter image description here
The main difference is that n-tier arch got 2 extra layers. Example on data layers one part of developers are SQL developers whose work on DB server (making DB structure, writing Stored procedures and so forth), and .Net developers whose work on consuming that stored procedures and making abstraction ( implementing repository pattern)...

3)Ajax tool Kit
A) Open Source Library for Web Development

4)Front End Angular Js
A)
5)Web Services

A)In real time web services are called as asmx webservices
6)Version Control Tools
A)SVN:opensource software handles all the changes made by your source code(tracks all the  files ,folders,directories,and modufication),
Update,Comment,Checkout,Import
TFS:
GIT:

7)what is constant method and extended method?
A)

8)what is Convert.tostring() and .totostring?
A)Convert.tostring() accepts NULL's where as  .totostring doesnt!!

9) what is view state/
A) In Asp.Net we have Runat="Server" to make controls like Textbox,Checkbox...
In ASP.Net MVC No view state and PostBack

10)Angular Js ,MVC, ASP.net and differences?
A)
11)oops concept definations with examples?
A)
12)Diff between class and object?
A)
13)what is constructor , polymorphism, abstraction and inheritance?
A)
14) difference between ASP and ASP.Net?
A)
15)difference between ADO and ADO.Net?
A)
16)Tell Me about your project?
A)
17)diff between stored procedure and functions?
A)
18)what is DataType and DataSet?
A)
19)Attributes in asp.net?
A)
20)Asp.net Life Cycle?
A)
21)Difference between HTML and HTML5?
A)
22)platforms to write .net program tools?
A)
23)which one is better Asp.net or MVC?
A)
24)what is  iis?
A)
25)what is ssl?
A)
26)what is memory and garbage collector?
A)
27)what is SDLC?
A)
28)what is Boxing and unboxing?
A)
29)what is sessions and how many types of sessions are there ?
A)
30)what is Asp.net life cycle?
A)
31)Lean MVC and Angular js?
A)
32)what are web services? , webservices will work with internet or not?
A)
33)what are user controls and custome controls?
A)
34)what are validations and how many types of validations are there?
A?)
35)what are filters in MVC?
A)
36)what is the difference between internet and intranet applications?
A)
37)what are the real time difference between .Net Framework versions?
A)
38)Difference between DataReader and adapter, scalar?
A)
39)what is the default connection present in WEBCONFIG file?
A)
40)what is Common Language Runtime? And CLS with real time experience?
A)
41)what are the version of webAPI?
A)
42)what is the state in sql server?
A)
43)what is left join and right join?
A)
44)what are stored procedure and 15 examples?
A)
45)what is Dataaccess layer and Business access layer?
A)
46)what is Xaml and Aspx?
A)
47) what is the difference between cluster and non cluster index?
A)
48) what is as and is in C# development?
A)
49) what is HTTPdoublePost ? and have we use in .Net MVC?
A)
50)what is dependency injection ? and how to over come it?
A)
51)what is sql injection? How to over come it?
A)
52)what is HTTPGET and HTTPPOST?
A)
53)Can one view have different controlers in MVC/
A)
54)how to transfer on table data in to another table in sql?
A)with two examples.
55)what is stack,queue,list in MVC?
A)
56)Grids in MVC and Angular JS?
A)
57)what is the difference between
A)
58)versions in visual studio?
A) Image result for versions in visual studio
59) Difference between web services and wcf?
A)
60) What is Web API?
A)
61) Steps to do SVN and TFS?
A)
62) Entity Framework?
A)
63) How to create user controls?
A)
64) What is session management, types?
A)
65) What is causing in .net C#?
A)
66) What are security levels in .net frame work?
A)
67) How did you work on unit testing, and how many types of testing are there in .net?
A)
68) Differentiate between page load and control load?
A)
69) How to create xml, and develop using xml in .net?
A)
70) Simple LINQ definition with sql crud?
A)
71) Types of errors in .net?
A) 1) Custom errors:
A: Application l
72) What are Cristal reports?
A)
73) writing data from xml to sql server and sql to xml?
A)
74) SSIS, SSRS, SSMS, SSI, SSL?
A)
75) What is global.ascx?
A)
76) Project documentation, support documentation, end –user requirements, control documentation?
A)
77) Ajax controls, sessions, user control sample program?
A)
78) Stored procedures CRUD, Using functions, Joints, grouping 4 queries?
A)
79) Triggers query (no necessary)?
A)
80) Stored procedure inside a stored procedure?
A)
81) Email subscription and sending program?
A)
82) What Sapp messaging using .net (Not necessary when you are booked only)?
A)
83) Write a small program using xml as a front end coding?
A)
84) Use security in between the coding?
A)
85) Threading and exception handling?
A)
86) Prepare a support documentation?
A)
87) Difference between session and view state?
A)
View state (Method): Client side execution
Session (Variable): State Management
1)View Page can only access data with in the same page, it cannot be accessed or redirected to another page
1) Session Variable can access across the pages
2)the value will be placed in the hidden class in the client side (i.e., Encoded view state)
2)It Stores all the data on the service and the session id key is stored in cookie, If cookies are disabled you can pass Session Id key as a URL query by passing AutoDetect in webconfig file
3) Not Safe to store any kind of information in view state
3) Safe because the data is saved in the server

107) Compilation Types:
1)      Debug Pointer search:
i)        Right Click on the running debug point and click Quick Watch you can see the values which will display and you can cross check by simply placing cursor in the property.
ii)        
88) What is inner joint and left joint?
A)
89) Control Binding in Angular JS?
A)
90) Projects
Explain your overall project?
1)      The Human Resource information system is comprehensive employee’s web application that allows you to store employee information in comprehensive employee database, and this database is interlinked with other module called HRMS(Iwowsoft) so there is no need to maintain multi set of database, It stores all the information of employee profile ,new applicant ,claim management ,leaves ,new bees profile , medical checkup ,  There are many features that helps you to minimize manual and repetitive tasks, thus saving time and improve efficiency.

Technologies?
The technologies we used in our project is Asp.net 4.0/4.5, C# 4.5, Html5 and Css3, JQuery , JQuery using AJAX for automation and backend as SQL Server database. I involved mostly in development of Business Access Layer and Date Access Layer, this is the new framework which I have implemented from my previous company

This Project makes HR Information very sensitive and important to use, can handle the employees information easier
2)      The Task Allocation is an internet based application which focus on the coordination and communication of higher authorities (Project Manager, Tech Lead, etc.) with different software developers. This project is intended to develop online projects schedule and management.
Task Allocation support project managers in the implementation of the functions required to achieve successful project completion. This project deals with gain immediate insight into enterprise activity with access to real time data. Project Health Status Indicators gives access project status quickly and accurately with completed tasks and in completed task module. Task Scheduler shows scheduling the tasks in monthly and weekly format.
Technologies?
The technologies we used in our project is Asp.net 4.0/4.5, C# 4.5, Html and Css, JavaScript, Selenium using C# for automation and backend as SQL Server database. I involved in developing Front End and Back End applications, this is the new framework which I have implemented from my previous company.
This project is very useful to our company to handle the projects, and complete the project in time
3)      The Enterprise resource planning is a business process management software that allows an organization to use a system of integrated applications to manage the business and automate many back office functions related to technology services and human resources.
Human Resource Management (SAP HRM), also known as Human Resource (HR)
Production Planning (SAP PP)
Material Management (SAP MM)
Financial Supply Chain Management (SAP FSCM)
Sales and Distribution (SAP SD)
Project System (SAP PS)
Financial Accounting and Controlling (SAP FICO)

4)      Vehicle Insurance Policy
5)      AHMP Hospitality

91) What is WCF?
92) What is Restful service?
93) Prepare a project document and task document from client and from project manager?
94) Example for multiple views in one page? (Difference asp.net, MVC, Angular JS)
95) Flow to write database logic in MVC, Angular, ASP.net using services or data access layer?
A) MVC: (Compile using VS Compiler)
1)      Create controller with razon view engine
2)      Add database table in App_data
3)      Create Ado.Net Entity Framework with namespace to your table
4)      Create action method to your table i.e., create object for your dB using namespace and call the values
5)      Create view bag for avoiding typecasting and easy execution with new features in .Net framework 4.0 and call Web grid to show the database table in grid using grid properties.
6)      Create an html tag to bind the columns.
Angular: (Compile using Browser Console)
1)      Create a new project
2)      Add class and write the properties {get; set;}
3)      Add Asp.Net web service and write database logic for displaying data
4)      Create a $http in controller function ($http.post and $http.get will help you to execute the web service)  and write directive scope to display values
5)      Create html table and bind the columns using ng-controller directives
Asp.Net: (Best Compiling using VS)
1)      DataAccessLayer()
2)      Asp.Net Web service()
3)      Entity Framework using Linq
4)      Xml using Linq
5)      WCF, and Other Web Services.
96) What is agile (a jail) development methodology? (No so easy to be an agile development)
A)
·         It’s a type of project manager (executing how should be the project execution and planning) Simple it is a methodology
·         Iterative :  it is Type Cycle repeating the process ( Example : Using same Blue print of a project )
·         Streamlined: Preparing documentation, code execution, Meetings all times.
·         Time-Boxing: Planning your work in time (Structured Feature A-B-C in 3 weeks) ,3 weeks of development we concentrate on time not on features
·         Very Collaborative i.e., fast moving process.
97) What is sql script? (Creating a script)
A) Maintaining all the Database Table data in a script is called a Sql Script, We can Export the tables data into script and import the data and execute to create database tables with populated data.
98) Steps to create crystal report and see there are any other reports to create?
·         Install sap crystal reports IDE search in Sap official website (scn.sap.com/docs/DOC-7824).
·         Look on database , If you want to create report for a table (Employee) follows steps
·         Create view by right clicking on view and select a table (Employee) and save it with some name.
·         New Project – New Web Application
·         Go to Toolbox and add Cristal Report Viewer on the
·         Note : If you are not Seeing Cristal reporting Viewer on Toolbox Go to properties – and change Target Framework to .net framework 4.0
·         Add Dataset on RK the project it provides the structure of the data (Drag and Drop the View created on the dataset).
·         Add Crystal reports on RK the project and select all the columns of the table
·         Then Header will appear
·         Change the text in the header page and Footer page on cristialreport viewer
·         Go to default aspx page and write the sql connection and bind the values to Cristal report viewer.
99) One view has to display in two buttons?
100) why do use LINQ (Linear Integrated Query Language): Generics-arrays-filtering and sorting with out execution
A) Single line of statement, communicating between two, it is used with differ data source, no need to execute across dB
1.       Creating sp that to connect table : To replace the employee with all details in same position
2.       Writing sp to update dB table i.e., stored procedure for replacing the employee
101) reverse of the word “Mohan” “nahoM”
102) Difference between Class and struct?
Class
struct
1)      Class is a reference type ,it stores in heap memory(dynamic memory allocation i.e.,Object creation) ,By default Private
1)      Struct is a value type , it stores in stack memory(Static Memory allocation i.e., Stores values), By default Public
struct MyStruct
{
    string MyProperty { get; set; }
}

void ChangeMyStruct(MyStruct input)
{
   input.MyProperty = "new value";
}

...

// Create value type
MyStruct testStruct = new MyStruct { MyProperty = "initial value" };

ChangeMyStruct(testStruct);

// Value of testStruct.MyProperty is still "initial value"
// - the method changed a new copy of the structure.
Bcz struct doest have nulls , methods will be null parameters
class MyClass
{
    string MyProperty { get; set; }
}

void ChangeMyClass(MyClass input)
{
   input.MyProperty = "new value";
}

...

// Create reference type
MyClass testClass = new MyClass { MyProperty = "initial value" };

ChangeMyClass(testClass);

// Value of testClass.MyProperty is now "new value"
// - the method changed the instance passed.
 The reference point out nulls and it will read the
Value by creating instance

103) Where did you implement angular Js?
JavaScript animations?
105) Best web sites to learn .net?
106) Types of grid used in asp.net, Mvc ,Angular ?
MVC: use webgrid
Example
@{
Viewbage.title=”List of xyz”;
Var grid=new webgrid(Source: Model, canpage: true, rowperpage:10);
Grid.pager(Webgridpagermodes.all);
}
<style>css styles</style>
<div>
Grid.gethtml{
tablestyle:””,

Headerstyle:””,
Footerstyle:””,
Alternatingrowstyle:””,
Rowstyle:””,
Columns:grid.columns((grid.column(header:, footer:),…….))
}}
107) Difference between ViewBage and viewData and tempdate?
A) ViewData
  1. ViewData is used to pass data from controller to view
  2. It is derived from ViewDataDictionary class
  3. It is available for the current request only
  4. Requires typecasting for complex data type and checks for null values to avoid error
  5. If redirection occurs, then its value becomes null
ViewBag
  1. ViewBag is also used to pass data from the controller to the respective view
  2. ViewBag is a dynamic property that takes advantage of the new dynamic features in C# 4.0
  3. It is also available for the current request only
  4. If redirection occurs, then its value becomes null
  5. Doesn’t require typecasting for complex data type
TempData
  1. TempData is derived from TempDataDictionary class
  2. TempData is used to pass data from the current request to the next request
  3. It keeps the information for the time of an HTTP Request. This means only from one page to another. It helps to maintain the data when we move from one controller to another controller or from one action to another action
  4. It requires typecasting for complex data type and checks for null values to avoid error. Generally, it is used to store only one time messages like the error messages and validation messages
108) 301 and 302 redirection?
A) In ASP.Net 4.0, you can use Response.RedirectPermanent, which will use 301 instead of 302.






Comments

  1. Hi mohan I want the full answer's for all questions can you please sendme

    ReplyDelete

Post a Comment

Popular posts from this blog

5 Tips To Get Rid of A Headache Quickly without Medicine

How to Hack Whats app messages using Spyzie (With out knowing)

How to install and configure VBA - Excel Macros || VBA Developer