VB .Net Interview Preparation Guide
Download PDF

VB .Net Interview Questions and Answers guide to get preparation of VB .Net Jobs Interview or Learn the basic and advance concepts of VB .NET Programming by our VB .Net Interview Questions and Answers Guide.

69 VB .Net Questions and Answers:

Table of Contents

VB .Net Interview Questions and Answers
VB .Net Interview Questions and Answers

1 :: What is the use of console application?

Console Applications are command-line oriented applications that allow us to read characters

from the console, write characters to the console and are executed in the DOS version. Console
Applications are written in code and are supported by the System. Console namespace.

2 :: How VB Implements the Disconnected Architecture as like VB.Net?

In VB to implement a disconnected recordset, after you have filled the recordset with the data, set its active connection property to "Nothing". That breaks the connection to the database. You can locally also save the data of the recordset by using its Save function.

3 :: What is the difference between .dll extension and .exe extension files?

The main difference between .dll and .exe is

.dll is the In process component where it take up the client's memory space to run. So the communication between the application and component(dll) is very fast.

.EXE is the Out of process component. It uses its own memory(not application memory) to run the component. The communication between the application and component is slow when compared to .dll

4 :: What is the base class of .net?

System. Object is the base class of .NET

It Supports

all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate super class of all classes in the .NET Framework; it is the root of the type hier

5 :: How to store and retrieve images in SQL server database through VB.NET?

Image file can be save in SQL server as a byte. Henceforth, the image is convert to a stream of byte using the IO.Memory Stream. This stream of byte can be save in a table with image data type.

6 :: What is different between Web.Config and Machine.Config and Where it will be ?

The settings made in the web.config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net application.
VB.NET is a windows application where as C# is a console.

8 :: What is non_deterministic finalization?

The Finalize method is actually executed by the runtime on a special thread allocated by the Garbage Collector (GC).The Finalize method is executed whenever the runtime feels it is appropriate, such as when a low-resource condition occurs and this situation is often referred to as non-deterministic finalization.

9 :: How do you define a read only property in a class module?

Public Class YourClass
Private yourName As String
Private yourNumber As Decimal

Public Sub New(breed As String)
yourName = breed
End Sub

Public ReadOnly Property Name() As String
Get
Return yourName
End Get
End Property

10 :: What is the source code for display the picture in button click event?

PictureBox1.Image = Image.FromFile("C:olympics08_basketball.gif")

11 :: What do you mean by Option Strict On?

Option Strict On will restrict the implicit type casting (defalut is off in vb.net)

12 :: What are Jagged Arrarys ?

Jagged array is an array inside an array is called a jagged array

13 :: How can we remove Handlers at Run time?

Remove Handler myobj.myEvent, AddressOf MyEventHandler

15 :: What is STA in .NET?

STA is Store Accumulator

16 :: What is the advantage of option strict on?

Visual Basic allows conversions of many data types to other data types. Data loss can occur when the value of one data type is converted to a data type with less precision or smaller capacity. A run-time error occurs if such a narrowing conversion fails. Option Strict ensures compile-time notification of these narrowing conversions so they can be avoided.

In addition to disallowing implicit narrowing conversions, Option Strict generates an error for late binding. An object is late bound when it is assigned to a variable that is declared to be of type Object.

Because Option Strict On provides strong typing, prevents unintended type conversions with data loss, disallows late binding, and improves performance, its use is strongly recommended.

What you can't do with Option Strict On, is accessing members of objects that are not declared as a specific object type. You must have a typed reference.

17 :: What do you mean by Serialization and Deserialization and its use?

To store the vb.net for data into an xml file is called Serialization. To load data from xml file to vb.net form is called DeSerialization.

18 :: What is MISL CODE?

When compiling to the managed code , your source code is translated to microsoft intermediate language code( MSIL), which is cpu-indenpendent set of instructions that can be effectively converted to native code.

19 :: What is Late Binding and Early Binding?

Late Binding: runtime binding
Early Binding: compile time binding as compilation is done before executing an application so it is called early binding.

20 :: What is the exact defination of Object?

A real world entity which has some specific attributes related to its characteristics and operations or methods associated with its attributes.

21 :: What are the difference between dispose(), close(), exit(), end()? When do we use them?

dispose(): should release all the resources that it owns.
close():closing the application
exit():Exiting from the loop
end():stops the execution of the page/function/procedure

22 :: What is the advantage of packaging over xcopy in .NET?

With the help of xcopy we solve the problem of DLL HELL and com dependencies and when we make xcopy of project all the dll, dependencies, assembly are updated automaticaly it's a powerful feature of .NET

23 :: What is the difference between DataTable and DataSet?

Data set can store many tables but a data table can have one table only.

24 :: What is the significance of delegates. Where should they be used? What are the situations where we require them?

Delegates are used as pointer to hold the controls actually i used the delegates when there is problem in VB.Net 2005 where each control is already threaded, to use my personla thread on these control i used delegates
Ex:
Private Delegate Sub dd()

Dim d1 As New dd(AddressOf c1)
Dim t1 As New Threading.Thread(AddressOf thread1)

public sub Thread1()
r1 =

Me.Label1.BeginInvoke(d1)

Me.Label1.EndInvoke(r1)
end sub

Public Sub c1()

Me.Label1.Text = ct1

Me.Label1.Refresh()

End Sub

25 :: What is the size of .NET object?

Default size when a class gets loaded in memory is 8 bytes.