No Job Rank General Question
1 Dev1 Describe the principles of OOPs
2 Dev1 Explain about "Abstraction"?
3 Dev1 Explain about “Encapsulation"
4 Dev1 Explain about “Polymorphism"
5 Dev1 Explain about “Inheritance"
6 Dev1 Explain about the different forms of Polymorphism?
7 Dev2
What is the difference between method
overloading and method overriding?
8 Dev2
What are the differences between IEnumerable
and IQueryable?
1
9 Dev1 Can Multiple Catch Blocks executed in c#?
10 Dev1 What is an object?
11 Dev1 What are reference types in C#?
12 Dev2 What is Managed or Unmanaged Code?
What is the difference between “out” and “ref”
13 Dev1
parameters in C#?
14 Dev1 What you mean by boxing and unboxing in C#?
15 Dev1 What are the access modifiers in C#?
16 Dev1 Can multiple inheritance implemented in C# ?
17 Dev1 What is sealed class in C#?
2
18 Dev2 Explain Generics Type in C#?
19 Dev2 What are differences between Array and ArrayList?
20 Dev1 What is the use of using statement in C#?
Difference between Equality Operator (==) and
21 Dev1
Equals() Method in C# ?
22 Dev2 How to use Nullable<> Types in .Net?
23 Dev3 What are delegates?
24 Dev3 What are indexers in C# .NET?
25 Dev2 Explain what is .NET Framework?
26 Dev1 What is NameSpace ?
3
What is the Difference between NameSpace and
27 Dev2
Assembly ?
28 Dev3 What is Reflection?
29 Dev2 What are Value types and Reference types ?
List out the namespace provided by .net for data
30 Dev2
management?
Explain how you can implement singleton pattern
31 Dev2
in .NET?
32 Dev2 What is ADO.NET ?
What are the namespaces used in ADO.NET for
33 Dev2
data access ?
34 Dev2 hat are the two fundamental objects in ADO.NET ?
35 Dev2 What is the use of connection object ?
4
What are the different execution methods provided
36 Dev3
by the command object ?
37 Dev2 What is a Dataset object ?
38 Dev2 What is the use of DataAdapter ?
39 Dev2 Which architecture does Datasets follow?
40 Dev2 What is DataTable in ADO.NET?
41 Dev2 What is the DataReader in ADO.Net?
42 Dev2 Explain the clear() method of DataSet?
43 Dev2 What is ASP.NET ?
44 Dev2
Explain the application event handlers in
ASP.NET ?
5
What are the Web Form Events available in ASP.NET
45 Dev2
?
What is the difference between Authentication and
46 Dev2
Authorization?
How many types of validation controls are provided
47 Dev2
by ASP.NET?
Explain the differences between Server-side and
48 Dev2
Clientside code?
What is the difference between HTML and Web
49 Dev2
server controls?
50 Dev2 What are the advantages of MVC over ASP.NET?
What is the difference between an
51 Dev2 HtmlInputCheckBox control and an
HtmlInputRadioButton control?
52 Dev2 Differentiate globalization and localization ?
6
53 Dev2 What is master page in ASP.NET?
What is the difference between Authentication and
54 Dev3
Authorization?
55 Dev2 Explain the application event handlers in ASP.NET ?
What’s difference between Dataset.Clone and
56 Dev3
Dataset.Copy ?
What’s difference between “Optimistic” and
57 Dev3
“Pessimistic” locking ?
58
59
60
61
62
7
Answer
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism.
- Increase extendability.
- Increase abstraction of layered architecture.
- Use interface or abstract class
- Hiding information and data.
- Use access modifier (public, protected, private)
- Make the system more modularized
- One name many forms
- Override, overload methods.
- Increase flexibility.
- Increase reusability
- Extends class, implements interface.
- Is - a relationship.
- Overriding
- Overloading
- Anonymous class.
a. Overloading method:
- Same names
- Different parameters (number and type, order)
- Others are flexible
-
b. Overriding:
- Same names
- Same parameters (number and type, order)
- Access modifier is less restrict
- Return type: same type or covariant type. (equal or narrower)
- IEnumerable
- belong to System.Collections namespace
- is the best way to write query on collections data type like List, Array,..
- is the return type for LINQ to Object and LINQ to XML queries.
- doesn’t support lazy loading
- IQueryable
- belongs to System.LinQ namespace
- is the best way to write query data like remote database, service collections.
- is the return type of LINQ to SQL queries.
- does support lazy loading
8
- Yes.
- Can use multiple catches blocks but only one can executed at once.
- “new” keyword is used to create an object.
- is an instance of a class through which we access the methods of that class.
- an object in memory will contain the information of methods, variables and behavior of that class
- Class
- String
- interface
- Object
- Managed Code
- The code, which is developed in .NET framework.
- This code is directly 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.
- Applications that do not run under the control of the CLR.
- Background compatibility with the code of VB, ASP and COM are examples of unmanaged code”.
- Out:
- Parameter can be passed to a method and it need not be initialized.
- Ref:
- Parameter has to be initialized before it is used.
- Boxing:
- - This is the process of converting from value type to reference type.
- UnBoxing:
- - This is the process of converting reference type to value type.
Public: it can be accessed from any code in the project.
Private: it can be accessed by any code within the containing class only. If an attribute or class is defined without access
modifiers, it's default access modifier will be private.
Protected: it can be accessed by any method in the inherited classes and any method within the same class. The protected
access modifier cannot be applied to classes and interfaces. Methods and fields in a interface can't be declared protected.
Internal: access is restricted to classes within the current project assembly.
Protected Internal: access is restricted to classes within the current project assembly and types derived from the
containing class.
No. If you want to inherit from multiple base classes, use interface.
- Once a class is defined as a sealed class, the class cannot be inherited.
- If a class is derived from a sealed class then the compiler throws an error.
9
- is used to make the Code reusable
- decreases the Code redundancy
- increases the performance
- type safety.
- Array:
o Fixed size.
o Data type: primitive, objects.
o Dimension: multi-Dimension array.
- ArrayList:
o Dynamic size.
o Data type: only object.
o Dimension: No.
- using block is used to obtain a resource and use it.
- automatically dispose of when the execution of block completed.
- Equality Operator (==):
- - is the comparison operator.
- - compares the reference identity.
- Equals() method:
- - compares the contents of a string.
- - compares only contents.
- is a data type contain the defined data type or the value of null.
- nullable type concept is not comaptible with "var".
- they are same are function pointers in C++
- they are type safe unlike function pointers.
- can be used to write much more generic type safe functions.
Indexers are known as smart arrays in C#.
It allows the instances of a class to be indexed in the same way as array.
- .NET Framework is developed by Microsoft.
- It provides technologies and tool that to build Networked Applications as well as Distributed Web Services and Web
Applications
- namespace is a logical grouping of related classes and types.
- every class should have a NameSpace.
10
- Namespace:
- Forms the logical boundary for a Group of classes.
- It is a Collection of names where each name is Unique.
- The namespace must be specified in Project Properties.
- Assembly:
- Assemblies are Self-Describing
- It is a unit of deployment and is used for versioning.
- Assemblies contain MSIL code.
- reflection is used to dynamically load a class.
- create object and invoke methods at runtime.
- read its own meta data to find assemblies, modules and type information at runtime
- Value types:
- are stored in stack part of the memory.
- Reference type:
- are stored in managed heap.
- Data
- Data.SQLClient
- XML
- create a class with static members
- define a private constructor
- to access the singleton object, a static method can be used
- ADO.Net is one of the major component of .Net Framework.
- designed to connect to databases like Oracle, SQL Server, MS Access etc.
- can work with data stored in them.
- System.Data
- System.Data.Common
- System.Data.OleDb
- System.Data.SqlClient
- System.Data.SqlTypes
- DataSet
- Object can have a set of DataTables and relationships between them.
- DataSet can be used in disconnected connection with DB.
- DataReader
- - is used to read the read only Data from a database.
- is used to establish a connection between an application and databases.
- once connection is established, SQL Commands can be executed.
- scope of a connection object can be local or global.
11
- ExecuteNonQuery: used to execute the command which did not return any output
- ExecuteReader: used to execute the command which return a typed IDataReader
- ExecuteScalar: used to execute the commands which return a single value.
- ExecuteXmlReader: used to execute the command that returns an XmlReader object.
- DataSet is used to store data from a data source.
- It consists of a set of data tables.
- We can also specify the relation between the tables inside a dataset
- used to populates tables within a dataset from a data source.
- uses ADO.Net Connection object to connect to a data source.
- It uses Command Objects to make changes to a data source
Datasets follow the disconnected data architecture.
- represents a single table in a database.
- In this show row and column.
- DataSet is a collection of data tables.
- In this store data record.
- holds only one table at a time.
- It only provides read only access mode and cannot write data.
- It is not required local storage to data store.
- Holds one row at a time.
- Uses less memory.
- DataReader do not maintain relation.
This method removes all rows from DataSet.
- is a Server-Side technology
- uses object-oriented programming approach.
- every element in ASP.NET is treated as an object and run on the server.
- use a fully featured programming language: C# or VB.NET
- Application_Start: Fired when the first user visits a page of the application or first resource is requested from the server.
- Application_End: Fired when there are no more users of the application.
- Application_BeginRequest: Fired at the beginning of each request to the server.
- Application_EndRequest: Fired at the end of each request to the server.
- Session_Start: when any new user visits.
- Session_End: when the users stop requesting pages and their session times out.
12
- Page_Init
- Page_Load
- Page_PreRender
- Page_Unload
- Page_Disposed
- Page_Error
- Page_AbortTransaction
- Page_CommitTransaction
- Page_DataBinding
Authentication
- Checking the identity of the user to allow the user into the application.
Authorization
- Handles the permission stuff for the user at web page level.
RequiredFieldValidator
- RangeValidator.
- CompareValidator.
- RegularExpressionValidator.
- CustomValidator.
- ValidationSummary
- Server side code is executed at the server side on IIS in ASP.NET framework
- Client side code is executed on the browser
- HTML controls are client-side controls
- Web server controls are server-side controls
Provides a clean separation of concerns among, model and Business Logic.
- - Easy to UNIT Test.
- - Improved reusability of model and views.
- - Improved structuring of the code.
HtmlInputCheckBox: you can select more than one from a group of HtmlInputCheckBox controls;
- HtmllnputRadioButton: you can select only a single control from a group of HtmlInputRadioButton controls.
Globalization
- to identify the specific part of a Web application that is different for different languages.
Localization
- to be supported for a specific language or locale
13
- - Master Page acts like a normal page.
- - Master Pages can contain controls, code or markup as in web form.
- - Master page will have a control called “ContentPlaceHolder.
- - Master pages will have extension ".master".
-
Authentication
- Checking the identity of the user to allow the user into the application.
Authorization
- Handles the permission stuff for the user at web page level.
- Application_Start: Fired when the first user visits a Page of the application or first resource is requested from the server.
- Application_End: Fired when there are no more users of the application.
- Application_BeginRequest: Fired at the beginning of each request to the server.
- Application_EndRequest: Fired at the end of each request to the server.
- Session_Start: when any new user visits.
- Session_End: when the users stop requesting Pages and their session times out
- Dataset.Clone
- - only copies the schema of a DataSet object like relations between data tables and constraints.
- Dataset.Copy
- - copies both the data and structure of a DataSet object.
- Pessimistic- - used when the user wants to update a record in a database and the user want to prevent other users from
updating the same record.
- - other user’s can only view the data when there is pessimistic locking.
- Optimistic
- - locking is used to improve concurrent operations on a record by allowing multiple users to update the same record.
- - the record is only locked when updating the record.
-
14
15
16
17
18
19
20
21