Explore topic-wise InterviewSolutions in .

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

101.

How Does You Get Record No From 5 To 15 From A Dataset Of 100 Records?

Answer»

DIM dRow as data.datarow
for i as interger = 5 to 15
drow = dSet.Tables(0).ROWS(i)
'process row
NEXT i

dim dRow as data.datarow
for i as interger = 5 to 15
drow = dSet.Tables(0).Rows(i)
'process row
next i

102.

What Is The Difference Between Dataset And Recordset?

Answer»

A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
-A DataSet is DESIGNED to work without any continuing connection to the original data source.
-Data in a DataSet is bulk-loaded, rather than being loaded on demand.
-There's no concept of cursor types in a DataSet.
-DataSets have no current record pointer You can use For Each loops to move through the data.
-You can STORE many edits in a DataSet, and write them to the original data source in a single operation.
-Though the DataSet is universal, other OBJECTS in ADO.NET come in different versions for different data sources.
[1)With Data set you can retrive data from database like oracle and SQL Server and manage them in one dataset, with recordset this is not possible.
2)All representation of Dataset is using XML while recordset uses COM.
3)Recordset can not be transmitted on HTTP while Dataset can be.]

A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
-A DataSet is designed to work without any continuing connection to the original data source.
-Data in a DataSet is bulk-loaded, rather than being loaded on demand.
-There's no concept of cursor types in a DataSet.
-DataSets have no current record pointer You can use For Each loops to move through the data.
-You can store many edits in a DataSet, and write them to the original data source in a single operation.
-Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.
[1)With Data set you can retrive data from database like oracle and SQL Server and manage them in one dataset, with recordset this is not possible.
2)All representation of Dataset is using XML while recordset uses COM.
3)Recordset can not be transmitted on HTTP while Dataset can be.]

103.

Why Datareader Is Useful?

Answer»

Data READER is useful when we just want to acccess datas from the DATABASE not when we want to perform DML operations. and It is useful when we want to perform forward only reading of datas.It wont requires any large VOLUME of resources in the Front end. [DATAREADER is READ only or forward only. So it is very fast to fetch the data from database.]

Data reader is useful when we just want to acccess datas from the database not when we want to perform DML operations. and It is useful when we want to perform forward only reading of datas.It wont requires any large volume of resources in the Front end. [Datareader is read only or forward only. So it is very fast to fetch the data from database.]

104.

How Does You Call And Execute A Sp In .net?

Answer»

USING command object we can EXECUTE a SP. INSTEAD of sql query we have to pass the SP NAME.
[command.connection =connectionstring
command.commandType=commandType.storedProcedure
command.commandtext="sp_name"
command.executenonquery()]

Using command object we can execute a SP. Instead of sql query we have to pass the SP Name.
[command.connection =connectionstring
command.commandType=commandType.storedProcedure
command.commandtext="sp_name"
command.executenonquery()]

105.

What Is Versioning In .net?

Answer»

main advantage of .NET is versioning and solve very critical problem.
.net maintain one application with more then one version and also solve DLL HELL problem because it can run same application with different version at a same TIME[.Net have an Assembly. It gives the Portable Execution file.The main USE of assembly is to maintain the Dll and exe's.
So SOMETIMES the programmer confused to which is modified code.That time the assembly provide the Version.That is CALLED versioning. It is start from 1.0.*,.......]

main advantage of .net is versioning and solve very critical problem.
.net maintain one application with more then one version and also solve DLL HELL problem because it can run same application with different version at a same time[.Net have an Assembly. It gives the Portable Execution file.The main use of assembly is to maintain the Dll and exe's.
So sometimes the programmer confused to which is modified code.That time the assembly provide the Version.That is called versioning. It is start from 1.0.*,.......]

106.

What Is An Indexed Property?

Answer»

you include the INDEX parameter in the Property statement. In this example, the test_number parameter is the index for the Scores property.
Public Class Student
' The private ARRAY of scores.
Private m_Scores(9) As Integer
' The INDEXED Score property procedures.
Public Property Score(ByVal test_number As Integer) As _ Integer
Get
RETURN m_Scores(test_number)
End Get
Set(ByVal Value As Integer)
m_Scores(test_number) = Value
End Set
End Property
End Class

you include the index parameter in the Property statement. In this example, the test_number parameter is the index for the Scores property.
Public Class Student
' The private array of scores.
Private m_Scores(9) As Integer
' The indexed Score property procedures.
Public Property Score(ByVal test_number As Integer) As _ Integer
Get
Return m_Scores(test_number)
End Get
Set(ByVal Value As Integer)
m_Scores(test_number) = Value
End Set
End Property
End Class

107.

What Is The Difference Between Web User Control And Web Custom Control?

Answer»

web user control: where it predefined attribute functionality where it RESIDES in control LIBRARY
web custom control: where it is defined by user itself and store in a custom library
Web User Controls:
1) Easy to Create
2) Limited support for consumers who use visual design tool
3) A seperate copy of the control is required in each application.
4)Cannot be added to TOOLBOX in Visual Studio.
5) GOOD for Static Layout.
Web Custom Controls:
1) Harder to Create
2) Full support for consumers
3) Only a SINGLE copy of the control is required in the GAC
4)Can be added
5) Good for Dynamic Layout.

web user control: where it predefined attribute functionality where it resides in control library
web custom control: where it is defined by user itself and store in a custom library
Web User Controls:
1) Easy to Create
2) Limited support for consumers who use visual design tool
3) A seperate copy of the control is required in each application.
4)Cannot be added to toolbox in Visual Studio.
5) Good for Static Layout.
Web Custom Controls:
1) Harder to Create
2) Full support for consumers
3) Only a single copy of the control is required in the GAC
4)Can be added
5) Good for Dynamic Layout.

108.

What Are The Advantage In Vb.net And Different Between Vb And Vb.net

Answer»

vb is not follow the OOPS concept. But vb.net follow the oops concept.
[Adv of VB.NET
vb is object based.vb.net is object oriented
vb use record SET for database connection
vb.net use dataset for database connection]
[1. VB uses vb runtime while vb.net uses CLR
2. VB object based,vb.net is object oriented
3. VB Suports splash screen
4. VB Uses on error goto while vb.net uses Try.. Catch..Finally
5. vb.Net SUPPORTS INHERITANCE]

vb is not follow the oops concept. But vb.net follow the oops concept.
[Adv of VB.NET
vb is object based.vb.net is object oriented
vb use record set for database connection
vb.net use dataset for database connection]
[1. VB uses vb runtime while vb.net uses CLR
2. VB object based,vb.net is object oriented
3. VB Suports splash screen
4. VB Uses on error goto while vb.net uses Try.. Catch..Finally
5. vb.Net Supports inheritance]

109.

What Are The Types Of Threading Models In Vb.net ?

Answer»

There are lot of threading model available, but we focus on Threading models that are common to win32based environments singleThreaded:There is only one thread with in the process,and it is doing all the work for the process.The process must wait for the current execution of the thread to complete before it can perform another action.
Apartment Threading (Single Threaded Apartment)Apartment threaded means there are multiple threads within the application. In single threaded apartment (STA) each thread is isolated in a separate apartment UNDERNEATH the process. The process can have any number of apartments that share data through a proxy. The application defines when and for how long the thread in each apartment should EXECUTE. All requests are serialized through the Windows message QUEUE such that only a single apartment is accessed at a time and thus only a single thread will be EXECUTING at any one time.
Free Threading (Multi Threaded Apartment)Free threaded applications were limited to programming languages such as C++ until the release of Microsoft .NET. The free threaded/Multi Threaded Apartment (MTA) model has a single apartment created underneath the process rather than multiple apartments. This single apartment holds multiple threads rather than just a single thread. No message queue is required because all of the threads are a part of the same apartment and can share data without a proxy.
The developer must provide thread synchronization as part of the code to ensure that threads do not simultaneously access the same resources.

There are lot of threading model available, but we focus on Threading models that are common to win32based environments singleThreaded:There is only one thread with in the process,and it is doing all the work for the process.The process must wait for the current execution of the thread to complete before it can perform another action.
Apartment Threading (Single Threaded Apartment)Apartment threaded means there are multiple threads within the application. In single threaded apartment (STA) each thread is isolated in a separate apartment underneath the process. The process can have any number of apartments that share data through a proxy. The application defines when and for how long the thread in each apartment should execute. All requests are serialized through the Windows message queue such that only a single apartment is accessed at a time and thus only a single thread will be executing at any one time.
Free Threading (Multi Threaded Apartment)Free threaded applications were limited to programming languages such as C++ until the release of Microsoft .NET. The free threaded/Multi Threaded Apartment (MTA) model has a single apartment created underneath the process rather than multiple apartments. This single apartment holds multiple threads rather than just a single thread. No message queue is required because all of the threads are a part of the same apartment and can share data without a proxy.
The developer must provide thread synchronization as part of the code to ensure that threads do not simultaneously access the same resources.

110.

How Do You Do Multithreading Application In Vb ?

Answer»

VB doesn't support MULTITHREADING.
[Its the FASTEST and an excellent application provided in VB.net. DUE to which many operations can be done WITHOUT any lapse of time. The system need not wait for an application or any task to get completed, rather it runs SIMULTANEOUSLY.]

VB doesn't support multithreading.
[Its the fastest and an excellent application provided in VB.net. Due to which many operations can be done without any lapse of time. The system need not wait for an application or any task to get completed, rather it runs simultaneously.]

111.

Difference Between Vb Dll And Assemblies In .net ?

Answer»

Assemblies can contain DLL and EXE both. DIFFERENT versions of one DLL can be handled by assemblies. They overcome the DLL Hell problem. Assemblies Contain Manifest and Meta Data files. These are the separate files that describes the Assembly and its ATTRIBUTES. VB DLL is inprocess.DLL run with an exe where as DLL are not self executable.
we can reuse DLLs .DLL are not platform INDEPENDENT If we have more then one Versions of a DLL we can face DLL Hell Problem.

Assemblies can contain DLL and EXE both. Different versions of one DLL can be handled by assemblies. They overcome the DLL Hell problem. Assemblies Contain Manifest and Meta Data files. These are the separate files that describes the Assembly and its attributes. VB DLL is inprocess.DLL run with an exe where as DLL are not self executable.
we can reuse DLLs .DLL are not platform independent If we have more then one Versions of a DLL we can face DLL Hell Problem.

112.

Is Vb.net Object Oriented? What Are The Inheritances Does Vb.net Support ?

Answer»

YES VB.NET ia an object oriented.Vb.net supports all inheritance
1)SINGLE inheritance
It means Single class inheriting to single child classes
2)multiple inheritance
multiple classess INHERITS to single classes
3)Multilevel Inheritance
Single class inherits to ONE class that class inheritd to single another class
4)Heirarichal inheritance
Single class inherits to Multiple classes
5)Hybrid Inheritance
Single class inherits to different classess and that classes inherits to one class.

yes VB.NET ia an object oriented.Vb.net supports all inheritance
1)single inheritance
It means Single class inheriting to single child classes
2)multiple inheritance
multiple classess inherits to single classes
3)Multilevel Inheritance
Single class inherits to one class that class inheritd to single another class
4)Heirarichal inheritance
Single class inherits to Multiple classes
5)Hybrid Inheritance
Single class inherits to different classess and that classes inherits to one class.

113.

What Is Intermediate Language In .net ?

Answer»

.net supports CLS i. e. Common language type. its a microsoft’s feature to bring all languages near one roof. When You compile .net CODE it doesn't converted into binary language, it converted into IL (Intermediate Language) also known as MSIL. And from IL to binary language converted at run time, CLR manages this process. At the runtime also it not converts whole project at time to binary, only converts that part which is going to EXECUTE, this the performance of project increases. This IL can use any language which is member of that .net studio. The assemblies (ExE, DLL) are also in IL FORM. So u can use any EXE or DLL created in vb.net in C#.net also.[which converts NATIVE code into byte code i.e machine understandable code.]

.net supports CLS i. e. Common language type. its a microsoft’s feature to bring all languages near one roof. When You compile .net code it doesn't converted into binary language, it converted into IL (Intermediate Language) also known as MSIL. And from IL to binary language converted at run time, CLR manages this process. At the runtime also it not converts whole project at time to binary, only converts that part which is going to execute, this the performance of project increases. This IL can use any language which is member of that .net studio. The assemblies (ExE, DLL) are also in IL form. So u can use any EXE or DLL created in vb.net in c#.net also.[which converts native code into byte code i.e machine understandable code.]

114.

How Do You Rate Yourself In .net ?

Answer»

Based on Framework understanding and OOPS CONCEPTS,USE of DIFFERENT Component Library.

Based on Framework understanding and OOPS Concepts,Use of Different Component Library.

115.

What Does Vs.net Contains ?

Answer»

Visual Studio .Net is basically a FRAMEWORK which makes easy development of codes written in Various programming languages.. It contains two things
1.Framework Class Library: It contains various classes managed WITHIN various namespaces.
2.Common Language Runtime: CLR is the execution engine which helps in COMPILING the IL code into machine code,TAKES care of security issues and many other critical tasks.Web pages, windows apps, console applications, Class libraries are various options which can be created using VS.net.

Visual Studio .Net is basically a framework which makes easy development of codes written in Various programming languages.. It contains two things
1.Framework Class Library: It contains various classes managed within various namespaces.
2.Common Language Runtime: CLR is the execution engine which helps in compiling the IL code into machine code,takes care of security issues and many other critical tasks.Web pages, windows apps, console applications, Class libraries are various options which can be created using VS.net.

116.

How Do You Validate Date By Using Which Validation Control?

Answer»

<asp:regularexpressionvalidator ID="regExpDate"
runat="server"
ValidationExpression="^\d{2}[\/-]\d{2}[\/-]\d{2,4}$"
ErrorMessage="It is not a VALID DATE"
ControlToValidate="txtpatientvisitdate"
EnableClientScript="False"
DISPLAY="DYNAMIC"></asp:regularexpressionvalidator>

<asp:regularexpressionvalidator id="regExpDate"
runat="server"
ValidationExpression="^\d{2}[\/-]\d{2}[\/-]\d{2,4}$"
ErrorMessage="It is not a valid date"
ControlToValidate="txtpatientvisitdate"
EnableClientScript="False"
Display="Dynamic"></asp:regularexpressionvalidator>

117.

What Is Vb.net?

Answer»

Vb.net is a programming LANGUAGE that is available in Visual Studio. Net. It contains features of visual basic which is event based programming language and also includes object oriented concepts.
[VB.Net is a programming language which is an extension of Visual Basic to MAKE it compliant to the DOT Net Framework. Also VB.Net is FULLY Object Oriented unlike Visual Basic and everything in VB.Net is an object. As it is compliant to the Dot Net Framework VB.Net can make full use of Framework Class Library PROVIDED by dot Net Framework.]

Vb.net is a programming language that is available in Visual Studio. Net. It contains features of visual basic which is event based programming language and also includes object oriented concepts.
[VB.Net is a programming language which is an extension of Visual Basic to make it compliant to the Dot Net Framework. Also VB.Net is fully Object Oriented unlike Visual Basic and everything in VB.Net is an object. As it is compliant to the Dot Net Framework VB.Net can make full use of Framework Class Library provided by dot Net Framework.]

118.

How Can We Assigns Items On Listbox So That It Will Show Rowwise Please Write The Code For It.

Answer»

Lisbox1.Items.Add "PRASHANT"
Lisbox1.Items.Add "Chinchu"
Lisbox1.Items.Add "PALLAVI"
Lisbox1.Items.Add "SURESH"
Lisbox1.Items.Add "Polika"

Lisbox1.Items.Add "Prashant"
Lisbox1.Items.Add "Chinchu"
Lisbox1.Items.Add "Pallavi"
Lisbox1.Items.Add "Suresh"
Lisbox1.Items.Add "Polika"

119.

What Are The Properties Should Be Given To Set Method?

Answer»

Class Class1
' DEFINE a LOCAL variable to store the PROPERTY value.
[Ans: Only One Property.
EXAMPLE:
Private PropertyValue As String
' Define the property.
Public Property Prop1() As String
Get
' The Get property procedure is called when the value
' of a property is retrieved.
Return PropertyValue
End Get
Set(ByVal Value As String)
' The Set property procedure is called when the value
' of a property is modified.
' The value to be assigned is passed in the
' argument to Set.
PropertyValue = Value
End Set
End Property
End Class

Class Class1
' Define a local variable to store the property value.
[Ans: Only One Property.
example:
Private PropertyValue As String
' Define the property.
Public Property Prop1() As String
Get
' The Get property procedure is called when the value
' of a property is retrieved.
Return PropertyValue
End Get
Set(ByVal Value As String)
' The Set property procedure is called when the value
' of a property is modified.
' The value to be assigned is passed in the
' argument to Set.
PropertyValue = Value
End Set
End Property
End Class