- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
VB.NET Interview Questions & Answers - Learning Mode

VB.NET Interview Questions & Answers - Learning Mode

Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language. VB.Net is a simple, modern, object-oriented computer programming language developed by Microsoft to combine the power of .NET Framework and the common language runtime with the productivity benefits that are the hallmark of Visual Basic.

Try VB.NET Interview Questions & Answers - Exam Mode

1 2 3 4 Next

Sort By : Latest First | Oldest First | By Rating

VB.NET Interview Questions & Answers - Learning Mode
Try VB.NET Interview Questions & Answers - Exam Mode
Question: What is the base class of .net?

Answer: 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 superclass of all classes in the .NET Framework; it is the root of the type hierarchy.
Question: What is .net?

Answer: .Net is the Development Platform which provides advanced feature facilities for the web and window application along with the window services . The .Net is the Middle layer between the operating System and the .Net application .The feature of .Net that the .Net Component can talk with each other without worrying about the language in which they are originally.. Two main components are CLR stands for the common Language Runtime and the .Net FrameWork Base classes. The CLR performs the task Source:
Question: What are attributes in Visual Basic .NET?

Answer: Attributes are items that hold information about items we are using in VB.NET. They are used when VB.NET needs to know more than what standard syntax can specified. Attributes are enclosed in angle brackets<>.

Example: To call a Windows API functions you have to include a dynamic link library (DLL) reference that the function you are calling resides in. This is done using the DLLImport attribute as follows:

Public Shared Function<DllImport""user32.dll")>MessageBox(Byval Source:
Question: Explain about the feature Anonymous type?

Answer: Anonymous type is a feature of VB.NET and it allows data types to be created from the code which requires it. This feature is present in VB as well as C#. They should be stored in variables declared with the keyword VAR. Dynamic typing is different and shouldn?t be confused with Anonymous type. Source:
Question: Name and explain some of the exclusive features which are present in VB?

Answer: Some of the features which are exclusive to VB are as follows: -
1) Name space can be hidden which can be disabled.
2) Certain project files can be hidden and a user can show them if he intends to do.
3) Lots and lots of shortcuts are present which ease the development of programs.
4) Using the AddressOf myObject function a delegate can be made. Source:
Question: What are Enumerations in VB.NET and how are they used?

Answer: Enumerations are new in VB.Net (As apposed to VB(i)) and they are used to group related sets of constants. To create a Enumeration you use the Enum statement. Example using a Enumeration

Module Module 1
Enum Months
End Enum
Sub Main()
System.Console.WriteLine(?December is ? & Months.December &? th Month?)
End Sub
End Module< Source:
Question: How to store and retrieve images in SQL server database through VB.NET?

Answer: SQL Server supports the ability for clients to store objects within tables Source:
Question: Explain about .NET?

Answer: .NET is a Microsoft Framework and a software component. .NET has a large library of pre-coded solutions which provided developer significant help in developing applications with solutions already present. It offers reliable security and cross platform compatibility. Source:
Question: How do I write data to a text file in VB.NET?

Answer: The following code creates a text file and inserts some text.

Imports System.IO
Public Class Form1 Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e_
As System.EventArgs) Handles MyBase.Load
Dim fs as New FileStream("exp.txt",FileMode.Create,FileAccess.Write)
Dim s as new StreamWriter(fs)
s.WriteLine("ProgrammersHeaven has lot of programming goodies")
s.WriteLine(" good resource for Source:
Question: what is the difference between string and stringbuilder?

Answer: system.string is immutable,system.string builder was designed with the purpose of having a mutable string where a variety of operations can be performed.
Question: What is the source code for display the picture in button click event?

Answer: PictureBox1.Image = Image.FromFile("C:olympics08_basketball.gif") Source:
Question: How to get the environment information in VB.NET?

Answer: The System.Environment namespace includes the functionality to get the environment information such as the UserName and OS Version.

File name is SystemInfo.vb
Imports System
Class SystemInfo
Shared Sub main()
Console.WriteLine("Current User")
Console.WriteLine("Name of the Machine")
Question: Explain Virtual Destructors

Answer: August 30th, 2009 by sd | Posted in Uncategorized

Some classes in the Standard Library do not have a virtual destructor or virtual member functions by design. These classes include std::string, std::complex, and all STL containers. The lack of a virtual destructor means one thing: This class shouldn?t serve as a base for other classes. Still, you can find many ?gurus? who offer a custom made string class that inherits from std::string. To see how dangerous such an illicitly-derived clas Source:
Question: What is the importance of the Option statement?

Answer: The Option statement is used to prevent syntax and logical errors in code. The possible suffixes of this statement are:

* Option Explicit: Is the default abd is On. Option Explicit requires declaration of all variables before they are used.
* Option Compare: This can be set to Binary or Text and it specifies if stringsp are to be compared using binary or text comparison operations.
* Option Strict: The default is Off. An example: If value of one data type is assigned to Source:
Question: Which is the tool which can convert Visual basic old version to .NET compatibility version?

Answer: There is a tool available which can convert old visual basic functions into new .NET code. Artin soft Visual basic upgrade Companion is very useful in converting VB code into .NET code. This tool was developed by Artin. This tool is integrated in Visual studio.NET 2005. It handles programs such as structured handling, error handling, etc. Source:
Question: What is Anchoring and Docking?

Answer: The VB terms Docking and Anchoring are used to make sure that a control covers the whole client area of a form.

Upon "docking" a window, it adheres to the edges of it's container (the Form). To "dock" a particular control, select the Dock property of the control from the properties window.

Selecting the Dock property opens up a small window like structure where you can select towards which side on the Form should the control be docked.

You can use Anchoring to "anchor" a Source:
Question: How do you define a read only property in a class module?

Answer: Declare Only Get function of the property. Source:
Question: what is non_deterministic finalization?

Answer: 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. Source:
Question: Name some of the features of C# which are not present in VB.NET?

Answer: Some of the features which are not present in VB are as follows they are: -
1) It supports unsafe code blocks for improved performance.
2) Partial interfaces and anonymous methods.
3) Multi line comments and static classes. Etc Source:
Question: How do I find the path from where the application is running?

Answer: To learn the path of your running application, do the following. Drag a Textbox and a Command Vbutton from the ToolBar and use the following code.

Public Class Form1 Inherits System.Windows.Forms.Form

1. Region " Windows Form Designer generated code "

1. End Region

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)
Handles Button1.Click

1 2 3 4 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.03125 Seconds