Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Give An Example That Shows How To Execute A Stored Procedure In Ado.net?

Answer»

Answer : using (SQLCONNECTION ConnectionObject = new SqlConnection()) { //Specify the name of the stored PROCEDURE to execute and the CONNECTION Object to use.
SqlCommand CommandObject = new SqlCommand("StoredProcedureName", ConnectionObject);
//Specify the SQL Command type is a stored procedure
CommandObject.CommandType = CommandType.StoredProcedure;
//Open the connection
ConnectionObject.Open();
//Execute the Stored Procedure
int RecordsAffected = CommandObject.ExecuteNonQuery();
}

2.

Can Your Class Inherit From Sqlcommand Class?

Answer»

No,

you cannot inheirt from SQLCOMMAND CLASS. SqlCommand Class is a sealed class. It is a compile TIME error.

No,

you cannot inheirt from SqlCommand Class. SqlCommand Class is a sealed class. It is a compile time error.

3.

When Do You Use Executereader, Executenonquery, Executescalar Methods?

Answer»

If the command or STORED procedure that is being executed returns a SET of rows, then we use ExecuteReader method.

If the command or stored procedure that is being executed returns a single value then we use ExecuteScalar method.

If the command or stored procedure performs INSERT, DELETE or UPDATE operations, then we use ExecuteNonQuery method.

ExecuteNon Query method returns an integer specifying the NUMBER of rows inserted, deleted or updated.

If the command or stored procedure that is being executed returns a set of rows, then we use ExecuteReader method.

If the command or stored procedure that is being executed returns a single value then we use ExecuteScalar method.

If the command or stored procedure performs INSERT, DELETE or UPDATE operations, then we use ExecuteNonQuery method.

ExecuteNon Query method returns an integer specifying the number of rows inserted, deleted or updated.

4.

How Do You Read An Xml File Into A Dataset?

Answer»

USING the DATASET OBJECT’s ReadXML METHOD.

Using the DataSet object’s ReadXML method.

5.

How Do You Ensure That The Database Connections Are Always Closed?

Answer»

To ensure that the database CONNECTIONS are ALWAYS closed, open the connection inside of a using block, as SHOWN in the following code fragment. Doing so ENSURES that the connection is automatically closed when the code exits the block.

using (SqlConnection ConnectionObject = NEW SqlConnection())
{
ConnectionObject.Open();
//The database connection will be closed when the control exits the using code block
}

To ensure that the database connections are always closed, open the connection inside of a using block, as shown in the following code fragment. Doing so ensures that the connection is automatically closed when the code exits the block.

using (SqlConnection ConnectionObject = new SqlConnection())
{
ConnectionObject.Open();
//The database connection will be closed when the control exits the using code block
}

6.

What Happens If Connection Pooling Is Enabled?

Answer»

If connection pooling is enabled and when you CALL Close or Dispose methods, then the connection is RETURNED to the connection POOL. This connection can then be resused.If connection pooling is disabled and when you call Close or Dispose methods, the underlying connection to the SERVER is actually CLOSED.

If connection pooling is enabled and when you call Close or Dispose methods, then the connection is returned to the connection pool. This connection can then be resused.If connection pooling is disabled and when you call Close or Dispose methods, the underlying connection to the server is actually closed.

7.

Will The Connection Be Closed, If The Sqlconnection Object Goes Out Of Scope?

Answer»

No,

If the SqlConnection goes out of SCOPE, it won't be CLOSED. Therefore, you must EXPLICITLY close the connection by calling Close or Dispose.

No,

If the SqlConnection goes out of scope, it won't be closed. Therefore, you must explicitly close the connection by calling Close or Dispose.

8.

Can You Inherit From Sqlconnection Class?

Answer»

No,

you cannot inheirt from SqlConnection CLASS. SqlConnection Class is a SEALED class. It is a compile time ERROR.

No,

you cannot inheirt from SqlConnection Class. SqlConnection Class is a sealed class. It is a compile time error.

9.

What Is The Difference Between Datareader And Dataadapter?

Answer»
  1. Data READER is read only FORWARD only and MUCH faster than DataAdapter.
  2. If you use DataReader you have to open and close connection EXPLICITLY where as if you use DataAdapter the connection is automatically opened and closed.
  3. DataReader is connection oriented where as Data Adapter is disconnected.

10.

Why Will You Usually Create An Aspnet User Account In The Database For An Asp.net Web Application?

Answer»

Web APPLICATIONS run USING the ASPNET user ACCOUNT. The SQL database administrator will have to set up this account and grant it PERMISSIONS before your Web application will have access to a SQL database. For file-based databases, such as Microsoft Access, you MUST grant permissions on the database file to the ASPNET user account using Windows file security settings.

Web applications run using the ASPNET user account. The SQL database administrator will have to set up this account and grant it permissions before your Web application will have access to a SQL database. For file-based databases, such as Microsoft Access, you must grant permissions on the database file to the ASPNET user account using Windows file security settings.

11.

List All The Steps In Order, To Access A Database Through Ado.net?

Answer»
  1. Create a connection to the database using a connection object.
  2. Invoke a command to create a DataSet object using an adapter object.
  3.  Use the DataSet object in code to display DATA or to CHANGE items in the database.
  4.  Invoke a command to UPDATE the database from the DataSet object using an adapter object.
  5. Close the database connection if you explicitly opened it in step 2 using the Open method. Invoking commands without FIRST invoking the Open method implicitly opens and closes the connection with each request.

12.

List The 4 Common Ado.net Namespaces?

Answer»

System.Data : CONTAINS Classes, types, and services for CREATING and ACCESSING data sets and their subordinate OBJECTS.

System.Data.SqlClient : Contains Classes and types for accessing Microsoft SQL Server databases.

System.Data.OracleClient : Contains Classes and types for accessing Oracle databases (Microsoft .NET FRAMEWORK version 1.1 and later).

System.Data.OleDb : Contains Classes and types for accessing other databases.

System.Data : Contains Classes, types, and services for creating and accessing data sets and their subordinate objects.

System.Data.SqlClient : Contains Classes and types for accessing Microsoft SQL Server databases.

System.Data.OracleClient : Contains Classes and types for accessing Oracle databases (Microsoft .NET Framework version 1.1 and later).

System.Data.OleDb : Contains Classes and types for accessing other databases.

13.

What Are The 3 Major Types Of Connection Objects In Ado.net?

Answer»

OleDbConnection OBJECT : Use an OleDbConnection object to connect to a Microsoft Access or third-party database, such as MySQL. OLE database connections use the OleDbDataAdapter object to PERFORM commands and RETURN data.

SqlConnection object : Use a SqlConnection object to connect to a Microsoft SQL SERVER database. SQL database connections use the SqlDataAdapter object to perform commands and return data.

OracleConnection object : Use an OracleConnection object to connect to Oracle databases. Oracle database connections use the OracleDataAdapter object to perform commands and return data. This CONNECTION object was introduced in Microsoft .NET Framework version 1.1.

OleDbConnection object : Use an OleDbConnection object to connect to a Microsoft Access or third-party database, such as MySQL. OLE database connections use the OleDbDataAdapter object to perform commands and return data.

SqlConnection object : Use a SqlConnection object to connect to a Microsoft SQL Server database. SQL database connections use the SqlDataAdapter object to perform commands and return data.

OracleConnection object : Use an OracleConnection object to connect to Oracle databases. Oracle database connections use the OracleDataAdapter object to perform commands and return data. This connection object was introduced in Microsoft .NET Framework version 1.1.

14.

What Is Microsoft Ado.net?

Answer»

VISUAL Studio .NET PROVIDES access to databases through the SET of tools and NAMESPACES collectively referred to as Microsoft ADO.NET.

Visual Studio .NET provides access to databases through the set of tools and namespaces collectively referred to as Microsoft ADO.NET.

15.

Differences Between "dataset"and "datareader"?

Answer»

DATASET OBJECT can contain MULTIPLE rowsets from the same data SOURCE as well as from the relationships between them.

DataSet object can contain multiple rowsets from the same data source as well as from the relationships between them.

16.

Model View Controller?

Answer»

we will learn about MVC design patterns, and how Microsoft has MADE our LIVES easier by creating the ASP.NET MVC FRAMEWORK for easier adoption of MVC patterns in our web applications.

we will learn about MVC design patterns, and how Microsoft has made our lives easier by creating the ASP.NET MVC framework for easier adoption of MVC patterns in our web applications.

17.

.net Assembly?

Answer»

This article explains .Net assembly, PRIVATE and SHARED assembly, satellite assemblies, resource-only assembly, RESOURCEMANAGER class, strong name, GLOBAL assembly cache.

This article explains .Net assembly, private and shared assembly, satellite assemblies, resource-only assembly, ResourceManager class, strong name, global assembly cache.

18.

Asp.net 2.0 Web Parts Framework?

Answer»

ASP.NET 2.0 ships with a Web PARTS Framework that provides the infrastructure and the BUILDING blocks required for creating modular web pages that can be easily customized by the USERS. You can use Web Parts to create portal pages that aggregate DIFFERENT TYPES of content, such as static text, links, and content that can change at runtime.

ASP.NET 2.0 ships with a Web Parts Framework that provides the infrastructure and the building blocks required for creating modular web pages that can be easily customized by the users. You can use Web Parts to create portal pages that aggregate different types of content, such as static text, links, and content that can change at runtime.

19.

.net Framework?

Answer»

This includes introduction of .Net FRAMEWORK, .Net framework architecture, role of ASSEMBLY and GAC.

This includes introduction of .Net framework, .Net framework architecture, role of assembly and GAC.

20.

Overview Of Ado.net Architecture?

Answer»

 Data Provider provides objects through which functionalities like OPENING and closing connection, retrieving and updating data can be availed.It also provides access to data source like SQL SERVER, Access, and Oracle.

Some of the data provider objects are:

  • Command object which is used to store procedures.
  • Data Adapter which is a bridge between datastore and dataset.
  • Datareader which reads data from data store in forward only mode.
  • A dataset object is not in directly connected to any data store. It represents DISCONNECTED and CACHED data.

The dataset communicates with Data adapter that fills up the dataset. Dataset can have one or more Datatable and relations.

 

 Data Provider provides objects through which functionalities like opening and closing connection, retrieving and updating data can be availed.It also provides access to data source like SQL Server, Access, and Oracle.

Some of the data provider objects are:

The dataset communicates with Data adapter that fills up the dataset. Dataset can have one or more Datatable and relations.

 

21.

Explain The Situations You Will Use A Web Service And Remoting In Projects?

Answer»

Web services should be used if the application demands communication over a public NETWORK and require to work ACROSS multiple platforms. Remoting is faster COMPARATIVELY and hence can be used in .NET components when performance is a high priority. Few APPLICATIONS can also make use of BOTH web services and Remoting to send and receive data not just across multiple platforms but also between .Net applications where performance and speed is a key priority.

Web services should be used if the application demands communication over a public network and require to work across multiple platforms. Remoting is faster comparatively and hence can be used in .Net components when performance is a high priority. Few applications can also make use of BOTH web services and Remoting to send and receive data not just across multiple platforms but also between .Net applications where performance and speed is a key priority.

22.

What Is Three Tier Architecture?

Answer»

Three tier architecture typically consists of a client, SERVER and “AGENT” between them. The agent is responsible for GATHERING the results and returning a single response to the agent. Such architecture increases performance, REUSABILITY and scalability of the APPLICATION.

Three tier architecture typically consists of a client, server and “agent” between them. The agent is responsible for gathering the results and returning a single response to the agent. Such architecture increases performance, reusability and scalability of the application.

23.

What Is Service Oriented Architecture?

Answer»

Service oriented ARCHITECTURE is based on SERVICES. Service is a unit of some task PERFORMED by a service provider in order to satisfy the consumer.

Service oriented architecture is based on services. Service is a unit of some task performed by a service provider in order to satisfy the consumer.

24.

What Is Windows Dna Architecture?

Answer»

Windows Distributed internet Applications ARCHITECTURE provides a robust, efficient SOLUTION to ENABLE Windows PLATFORM.

Windows Distributed internet Applications architecture provides a robust, efficient solution to enable Windows platform.

25.

What Is Aspect Oriented Programming? What Is Cross Cutting In Aop?

Answer»

Aspect-Oriented Programming (AOP), also named Aspect-Oriented Software Development (AOSD), is an approach to software development that goes further in the direction of separation of concerns. Separation of concerns is one of the most important rules in software development. It states that the same concern should be solved in a single unit of code. This is also CALLED modularization. In procedural programming, the unit of code is the procedure (or function, or method). In object-oriented programming, the unit of code is the CLASS. Some concerns cannot be IMPLEMENTED successfully using a pure procedural or object-oriented programming.

An example is code security. If you want to secure OBJECTS and methods, you have to modify the code of each method. That's why security is said a crosscutting concern, because it crosscuts the unit of modularization of the programming paradigm, in this case the class. An aspect is a concern that cross-cuts many classes and/or methods. So AOP is a technique that allows to address ISSUES that cross-cuts objects. AOP is frequently used to implement caching, tracing, security or failure injections.

Aspect-Oriented Programming (AOP), also named Aspect-Oriented Software Development (AOSD), is an approach to software development that goes further in the direction of separation of concerns. Separation of concerns is one of the most important rules in software development. It states that the same concern should be solved in a single unit of code. This is also called modularization. In procedural programming, the unit of code is the procedure (or function, or method). In object-oriented programming, the unit of code is the class. Some concerns cannot be implemented successfully using a pure procedural or object-oriented programming.

An example is code security. If you want to secure objects and methods, you have to modify the code of each method. That's why security is said a crosscutting concern, because it crosscuts the unit of modularization of the programming paradigm, in this case the class. An aspect is a concern that cross-cuts many classes and/or methods. So AOP is a technique that allows to address issues that cross-cuts objects. AOP is frequently used to implement caching, tracing, security or failure injections.

26.

How Do You Implement Prototype Pattern In .net?

Answer»

Prototype pattern is USED to create copies of original instances known as clones. It is used when CREATING instances of a CLASS is very complex.

Prototype pattern is used to create copies of original instances known as clones. It is used when creating instances of a class is very complex.

27.

How Can We Implement Singleton Pattern In .net?

Answer»

SINGLETON PATTERN RESTRICTS only one instance running for an OBJECT.

Singleton pattern restricts only one instance running for an object.

28.

What Is Mvc Pattern?

Answer»

Model View CONTROLLER is USED to separate the interface from the BUSINESS logic so as to GIVE a better visual appearance.

Model View Controller is used to separate the interface from the business logic so as to give a better visual appearance.

29.

What Is The Difference Between Factory And Abstract Factory Patterns?

Answer»

The difference between FACTORY and Abstract Factory PATTERNS LIES in object instantiation. In Abstract factory PATTERN Composition.

The difference between Factory and Abstract Factory Patterns lies in object instantiation. In Abstract factory pattern Composition.

30.

What Are Design Patterns? Define Basic Classification Of Patterns?

Answer»

A DESIGN pattern in Software is used to SOLVE SIMILAR problems that OCCUR in different scenarios.

A design pattern in Software is used to solve similar problems that occur in different scenarios.

31.

How To Find The Count Of Records In A Dataset?

Answer»

DS.Tables["tabname"].Rows.COUNT;

we can GET count of the RECORDS.

DS.Tables["tabname"].Rows.Count;

we can get count of the records.

32.

What Is Data Adapter?

Answer»

Data ADAPTER is bridge between Connection and DataSet , Data adapter in passing the sql query and fill in dataset.

Data adapter is bridge between Connection and DataSet , Data adapter in passing the sql query and fill in dataset.

33.

What Is Isolation?

Answer»

A transaction is a UNIT of isolation ? allowing concurrent transactions to behave as though each were the only transaction running in the system.

Isolation requires that each transaction appear to be the only transaction MANIPULATING the data store, even though other transactions may be running at the same time. A transaction should never SEE the intermediate stages of another transaction.

Transactions attain the highest level of isolation when they are serializable. At this level, the results OBTAINED from a set of concurrent transactions are identical to the results obtained by running each transaction serially.

Because a high degree of isolation can limit the number of concurrent transactions, some applications REDUCE the isolation level in exchange for better throughput.

A transaction is a unit of isolation ? allowing concurrent transactions to behave as though each were the only transaction running in the system.

Isolation requires that each transaction appear to be the only transaction manipulating the data store, even though other transactions may be running at the same time. A transaction should never see the intermediate stages of another transaction.

Transactions attain the highest level of isolation when they are serializable. At this level, the results obtained from a set of concurrent transactions are identical to the results obtained by running each transaction serially.

Because a high degree of isolation can limit the number of concurrent transactions, some applications reduce the isolation level in exchange for better throughput.

34.

What Is Atomicity?

Answer»

A transaction is a UNIT of work in which a SERIES of operations OCCUR between the BEGIN TRANSACTION and END TRANSACTION statements of an application. A transaction executes exactly once and is ATOMIC ?

all the work is done or none of it is.

Operations associated with a transaction usually share a common intent and are interdependent.
By performing only a SUBSET of these operations, the system could compromise the overall intent of the transaction. Atomicity eliminates the chance of processing a subset of operations.

A transaction is a unit of work in which a series of operations occur between the BEGIN TRANSACTION and END TRANSACTION statements of an application. A transaction executes exactly once and is atomic ?

all the work is done or none of it is.

Operations associated with a transaction usually share a common intent and are interdependent.
By performing only a subset of these operations, the system could compromise the overall intent of the transaction. Atomicity eliminates the chance of processing a subset of operations.

35.

Explain Acid Properties?

Answer»

The TERM ACID conveys the role transactions play in mission-critical applications. Coined by transaction PROCESSING pioneers, ACID stands for atomicity, CONSISTENCY, isolation, and durability.

These properties ensure predictable behavior, REINFORCING the role of transactions as all-or-none propositions designed to reduce the management LOAD when there are many variables.

The term ACID conveys the role transactions play in mission-critical applications. Coined by transaction processing pioneers, ACID stands for atomicity, consistency, isolation, and durability.

These properties ensure predictable behavior, reinforcing the role of transactions as all-or-none propositions designed to reduce the management load when there are many variables.

36.

What Is The Provider And Namespaces Being Used To Access Oracle Database?

Answer»

The PROVIDER NAME is OLEDB and the NAMESPACE is system.data.oledb

The provider name is oledb and the namespace is system.data.oledb

37.

What Provider Ado.net Use By Default?

Answer»

Ado.net USES no DATAPROVIDER by DEFAULT.

Ado.net uses no Dataprovider by default.

38.

What We Do With The Object Of Ado.net Dataset After Using It?can We Dispose It Or Can We Set It Nothing?is It Must Or Not?

Answer»

we USE DISPOSE.

we use dispose.

39.

What Are The Two Fundamental Objects In Ado.net?

Answer»

DATAREADER and DATASET are the TWO FUNDAMENTAL OBJECTS in ADO.NET.

Datareader and Dataset are the two fundamental objects in ADO.NET.

40.

What Are The Different Row Versions Available In Table?

Answer»

There are four types of Rowversions.

Current:
The current values for the row. This row VERSION does not exist for rows with a RowState of Deleted.

Default :
The row the default version for the current DataRowState. For a DataRowState VALUE of Added, Modified or Current, the default version is Current. For a DataRowState of Deleted, the version is Original. For a DataRowState value of Detached, the version is PROPOSED.

Original:
The row CONTAINS its original values.

Proposed:
The proposed values for the row. This row version exists during an EDIT operation on a row, or for a row that is not part of a DataRowCollection.

There are four types of Rowversions.

Current:
The current values for the row. This row version does not exist for rows with a RowState of Deleted.

Default :
The row the default version for the current DataRowState. For a DataRowState value of Added, Modified or Current, the default version is Current. For a DataRowState of Deleted, the version is Original. For a DataRowState value of Detached, the version is Proposed.

Original:
The row contains its original values.

Proposed:
The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection.

41.

If A Table Contains 20000 Records. In A Page At Each Time 100 Records To Be Displayed. What Are The Steps You Will Take To Improve Performance? Will You Use Dataset Or Datareader?

Answer»

we have to use a DATASET because on using datareader forward only paging can be achieved. Suppose if you are at 1000 page and you WANT to GO back to 999th page, if you use datareader it cannot be achieved, since it does not support backward navigation. Dataset supports forward and backward navigation.

we have to use a dataset because on using datareader forward only paging can be achieved. Suppose if you are at 1000 page and you want to go back to 999th page, if you use datareader it cannot be achieved, since it does not support backward navigation. Dataset supports forward and backward navigation.

42.

What Is Bubbled Event Can You Explain?

Answer»

All heavy controls like grid VIEW, datagrid or DATALIST, repeater controls cantains the child controls like button or link button, when we click this button then the event will be raised, that EVENTS are handled by parent controls, that is called event BUBBLING, means event is bubbled from bottom (child) to up (parent).

All heavy controls like grid view, datagrid or datalist, repeater controls cantains the child controls like button or link button, when we click this button then the event will be raised, that events are handled by parent controls, that is called event bubbling, means event is bubbled from bottom (child) to up (parent).

43.

What Is Different Between Sqlcommand Object And Command Behavior Object?

Answer»

ADO.NET Command Object - The Command object is similar to the old ADO command object.

It is used to store SQL STATEMENTS that NEED to be EXECUTED against a data source.

The Command object can execute SELECT statements, INSERT, UPDATE, or DELETE statements, stored procedures, or any other STATEMENT understood by the database.

ADO.NET Command Object - The Command object is similar to the old ADO command object.

It is used to store SQL statements that need to be executed against a data source.

The Command object can execute SELECT statements, INSERT, UPDATE, or DELETE statements, stored procedures, or any other statement understood by the database.

44.

Can Datareader Hold Data From Multiple Tables?

Answer»

data reader can hold data from MULTIPLE tables and datareader can hold more than ONE table.

string QUERY="select * from employee; select * from STUDENT";
sqlcommand cmd=new sqlcommand(query, connection);
sqldatareader dr=cmd.executeReader();
if(dr.hasrows)
{
dr.read();
gridview1.DataSource=dr;
gridview1.Databind();
if(dr.nextresult)
{
gridview2.datasource=dr;
gridview2.databind();
}
}
dr.colse();
connection.close();

data reader can hold data from multiple tables and datareader can hold more than one table.

45.

I Loaded The Dataset With A Table Of 10 Records. One Of The Records Is Deleted From The Backend, How Do You Check Whether All The 10 Records Were Present While Updating The Data(which Event And Steps) And Throw The Exception.

Answer»

By USING the Transactions we can check the EXACT NUMBERS of the rows to be updated and if the UPDATION fails then the TRANSACTION will be rollbacked.

By Using the Transactions we can check the Exact Numbers of the rows to be updated and if the updation fails then the Transaction will be rollbacked.

46.

What Is Typed And Untyped Dataset?

Answer»

A DataSet can be Typed or Untyped. The DIFFERENCE between the two lies in the fact that a Typed DataSet has a schema and an Untyped DataSet does not have one. It should be NOTED that the Typed Datasets have more support in VISUAL studio.

A DataSet can be Typed or Untyped. The difference between the two lies in the fact that a Typed DataSet has a schema and an Untyped DataSet does not have one. It should be noted that the Typed Datasets have more support in Visual studio.

47.

How To Call The Sql Commands Asynchronously In Ado.net Version 2.0?

Answer»

EXECUTESCALAR()
executereader()
executenonquery()

These COMES with BEGIN and End LIKE Beginexecutescalr() Endexecutescalar()....... by using these command we can achieve ASYNCHRONOUS command in ado.net.

executescalar()
executereader()
executenonquery()

These comes with Begin and End like Beginexecutescalr() Endexecutescalar()....... by using these command we can achieve asynchronous command in ado.net.

48.

How To Copy The Contents From One Table To Another Table And How To Delete The Source Table In Ado.net?

Answer»

Answer : DATASET ds; sqlAdap.Fill(ds); DATATABLE dt = ds.Tables[0].copy(); //now the structure and data are copied into 'dt' ds.Tables.remove(ds.Table[0]); //now the source is REMOVED from the 'ds'

49.

How To Find The Given Query Is Optimised One Or Not?

Answer»

First EXECUTE Sql Queries in Query Analzer,see How MUCH TIME it take to Execute , if it is Less then the your DESIRED Time, then it will OPTIMIZE query.

First Execute Sql Queries in Query Analzer,see How much time it take to Execute , if it is Less then the your desired Time, then it will Optimize query.

50.

Why Cannot We Use Multiple Inheritance And Garbage Collector Paralelly In .net?

Answer»

.Net doesn't SUPPORT the mutiple inheritance, perhaps you may talk about multi-level inheritance.

In the later case, if a class is inherited from another class, at the time of creating INSTANCE, it will OBVIOUSLY give a call to its base class constructor (ie bottom - top approach). Like wise the constructor execution is TAKES place in top down approach (ie. base class constructor is executed and the derived class constructor is executed).

So for GC, it will collect only when an object does not have any reference. As we see previously, the derived is constructed based on base class. There is a reference is set to be. Obviously GC cannot be COLLECTED.

.Net doesn't support the mutiple inheritance, perhaps you may talk about multi-level inheritance.

In the later case, if a class is inherited from another class, at the time of creating instance, it will obviously give a call to its base class constructor (ie bottom - top approach). Like wise the constructor execution is takes place in top down approach (ie. base class constructor is executed and the derived class constructor is executed).

So for GC, it will collect only when an object does not have any reference. As we see previously, the derived is constructed based on base class. There is a reference is set to be. Obviously GC cannot be collected.