VB.Net interview questions for experienced/VB.Net Interview Questions and Answers for Freshers & Experienced

What Is Misl Code?

MSIL code is the Microsoft Intermediate Language. This is the code created by the CLR from the source code. This MSIL code is converted to machine/native code by JIT compiler. This machine code is actually the code which runs.

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 Is The Diff Between Vb Mdi Form And .net Mdi Form?

In VB MDI form is created by adding MDI Form to the project and adding child forms by setting MDICHILD property of the child form. In .NET there is no MDI form, any form can be made a MDI parent by setting IsMdiContainer property to TRUE.
Furthermore, there are changes in the properties, methods and basic behavior of the MDI Forms, like ability to set Background Color is not available in .NET, ability to add controls to MDI form(although they don't behave properly), ActiveForm to ActiveMdiChild, Arrange method to LayoutMdi, etc.

How Would You Implement Inheritance Using Vb.net ?

Using VB.NET we can create a class that provides basic functionality so that other classes can inherit its members. VB.NET provides the 'Inherits' keyword to implement inheritance. By using the keyword 'Inherits' we can inherit the characteristics of a class into another class.

How To Check For A Particular Record Whether It Is Present Or Not In Dataset

if the record is not present i want to display a message as no records what is the code for checking
if you are using "DataReader" then
if DataReaderName.HasRows then
statements
else
statements
end if
if you are using "DataSet" then
if DataSetName.TABLES.("tablename").ROWS.COUNT=0 THEN
statements.
end if

How To Store And Retrieve Images In Sql Server Database Through Vb.net?

To store image in database 1st u need to make table like this
CREATE TABLE PicImage
(
Picid int,
Pic Image
)
Now in vb.net coding u have to write code like this
Dim ms As New MemoryStream
pic_photo.Image.Save(ms, pic_photo.Image.RawFormat)
arrImage = ms.GetBuffer
ms.Flush()
Now pass arrImage in ur insert query.

Differences Between Vb.net And C#, Related To Oops Concepts?

1. C# uses Must not Inherit, VB.Net uses sealed class
2. C# uses Internal, VB.Net uses Friend
3. VB.Net uses with events and end events
4. C# uses abstract and VB.Net uses Must Inherit

How Can I Extract The Formated Word(bold,italic,underline,font,color Etc) From The Msword File.?

using CommonDialog class
eg:
the code to invoke the default font dialog box by using the FontDialog control is given below:
private sub displayfont_click(byval sender as system.object, byval e as system.eventargs) handles displayfont .click fontdialog. showDialog()
textbox1.font=fontdialog1.font
end sub
the code to invoke the default font dialog box by instantiating the fontdialog class is:
dim fdialog as new fontdialog()
private sub displayfont_click(byval sender as system.object,byval e as system.eventargs) handles displayfont. click fdialog. showDialog()
textbox1.font=fontdialog1.font
end sub

Whats The Difference Bt. .dll Extension And .exe Extension Files?

DLL : It is an inprocess server and runs in the same memory space as client application. Problem with dll is if any error comes in dll, whole application gets crashed.
Exe : It is an out of process server and rus as independent application in seperate memory. If error comes in exe, it does not affact the client application.

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 superclass of all classes in the .NET Framework; it is the root of the type hierarchy.

Please List Some Final Year Projects That Can Be Done Using Vb.net In The Application Level.

You can go for internet control of robot.
1. use chips:- at89c51 microcontroller, l293d motor driver n max232 converter (for robot)
2. using vb.net, develop the gui n use winsock programming for sending photos on internet.
3. use mscomm programming in .net to move the robot in a wired connection with the comp.
4. u can also use Enbedded C for microcontroller programming in place of assembly.use keil compiler for that n its available for free on internet.
5. attach a cam to robot, move it n transfer the photos captured to the client over internet.

Can Any Body Tell Me The Code Procedure For Preparing Parameterized Cristel Reports.the Report Should Be Generated By Taking To Or More Parameters. Example: Report Should Be Genarated From Date To Todate?


We can generate Crystal Report by using date parameter, but the date format should be "yyyy,mm,dd".
Ex.CrystaReport1.SelectionFormula = "{GLNOTE.L_DT}=date(" & a & ")"
The variable 'a' should be assign with formated date.

What Is The Dif B/w Panel And Groupbox.

Both panel and group box acts like a container to other controls they help us a lot in some applications where we want a group of controls or objects should be disabled or enabled when a specific task is performedthe main difference is group box has a hording where u can place a text of ure own whereas a panel is just like a frame what we used in VB but has a scrollbar(hs,vs).

What Is The Difference B/w Readonly Variable And Constant Variable?


variable used to store the data
Read only variable:-
Read only variable means read only but not allow to write
constant:
constant variable specify the constant value.

How To Call A List Box On The Text If Some One Send Me The Code For It

i understood the ? like this what to do if we need to transfer the listbox items to the text if i am correct then my answer to this is double click on the listbox so that the eventof the listbox is displayed in the code editori.e
private sub listbox1_selectedindexchanged......
textbox1.text=listbox1.selecteditem.

What Are Fixed Memory Leaks And Threads Locking Problems.

Memory leak is a bug in the program which uses the memory continuously without releasing it until the system crash.Thread locking problem is nothing but a deadlock situation in case of synchronous process when two consecutive threads get lock on a common resource and waiting for each other to release that. This happens usually in case when the semaphores or monitors are not used.

What Is The Common Language Runtime?

CLR means commaon language runtime for the dot net frame work.it is the frame work layer that resides above the operating system and handels/ manages the execution of the .net applications.our .net programs don't directly communicate with the operating system but through CLR.

OUT .NET APPLICATION--->>CLR--->WINDOWS OS

Is There Any Easy Way To Convert Vb6 Programs To Vb.net?

Just Open The Vb Project in Visual Studio.Net(File---> Open).

What Are The Similarities Between Class And Structure?


-> Both can have constructors, methods, properties , fields, constants , enumerations, events and event
handlers.
-> Structure and class can implement interface.
-> Both of them can have constructor without parameter and with parameter.
-> Both can have delegates and events.
[class is a collection of methods functions and properties enumerators and fields.
structure can be defined as a tool for handling a group of logically related data item.
the main difference is class is a referance type.structure is a reference value type.]

What Is Clr?

CLR means Common Language Runtime.It is Major component of the .NET frameworkIt provides number of benefits to the developers such as Exception handling,Security,Debugging and Versioning...

What Is The Difference Between Clr & Cts?

CLR is the common language runtime. which is the feature makes the .net applications to run plantform independent langauge interoperability.
CTS Common type system is the part of the CLR which enable the Common Datatype system to All the .net languages.it also defines conventions to convert objects from one langauge to another

What Is The Difference Between Friend And Protected Friend?


Protected variable will be accessed in inherited class, but instance variable of class cant access protected variable.While friend variable will be accessed in inherited class as well as instance variable of class across the project.Where we need both functionality we are using protected friend scope.

[Protected --> Accessible ONLY by
1.Derived classes

2.Within the same class
Friend --> Accessible ONLY by
1.Derived classes
2.Classes in the same assembly
3.Within the same class
Protected Friend --> Accessible ONLY by
1.Derived classes
2.Classes in the same assembly
3.Within the same class]

What Is An Abstract Class?


It is a class which contains at least one abstract method(A method without any implementation). Other methods can have implementations. This class can not be instantiated. It can always become a base class for other classes.

What Is Shadowing?

When global and local varible in the same name.the local varibale in a mehod or function which use to override the global is called the shadowing.ie the Global varible is being shadowed by the local varible.

How Do You Declare Static Variable And How It Is Declared And What Is Its Lifetime?

Static variables are declare through the Static Var1 as Integer The scop of the Var1 is within the module where its is Defined.

What Is The Difference Between Dataset And Datareader?

DataReader:

Datareader is like a forward only recordset. It fetches one row at a time so very less Network Cost compare to DataSet(Fetches all the rows at a time). DataReader is readonly so we cannot do any transaction on them. DataReader will be the best choice where we need to show the data to the user which requires no transaction i.e reports. Due to DataReader is forward only we cannot fetch the data randomly. .NET Dataproviders optimizes the datareaders to handle the huge amount of data.

DataSet:

DataSet is always a bulky object that requires lot of memory space compare to DataReader. We can say the dataset as a small database because it stores the schema and data in the application memory area. DataSet fetches all data from the datasource at a time to its memory area. So we can traverse through the object to get required data like querying database.The dataset maintains the relationships among the datatables insideit. We can manipulate the realational data as XML using dataset.We can do transactions (insert/update/delete) on them and finally the modifications can be updated to the actual database. This provides impressive flexibility to the application but with the cost of memory space. DataSet maintains the original data and the modified data seperately which requires more memory space. If the amount of data in the dataset is huge then it will reduce the applications performance dramatically.

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

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

what is a deep copy?

A Deep copy refers to the creation of a new object and then copying the fields that are non-static of the current object to the new object.

What is the difference between value and reference types?

Value types are used for storing the data directly and it will be allocated to the stack. Reference types will be storing a reference to the value’s memory address and will be allocated to the heap.

What do you understand by the term Code Security?

The .NET framework is flexible and compatible to provide the security features in order to secure code from unauthorized users. There are two different types of security in .NET. They are:

<> Role-based security: Responsible for authorizing the user

<> Code access security: Ensures to provide protection to the system resources from the unauthorized calls

What is the purpose of the Async keyword in VB.NET?

The Async keyword in VB.Net is used for indicating that the lambda expression or the method that it modifies is said to be asynchronous. Such methods are called as async methods. The caller of an async method is allowed to resume its work without waiting for the async method to complete.

Describe what Authentication and Authorization means? What are the types of Authentication?

Authentication is referred to the process of obtaining the credentials (Usernames and passwords) from the users and verify the user’s identity. Authorization is the process of providing access to authenticated resources. Authentication leads to Authorization. There are three types of Authentication and they are:

1. Windows Authentication
2. Forms Authentication
3. Passport Authentication

What are Option Strict and Option Explicit?

Net generally is flexible to provide its support for the implicit conversion of any data type. To ensure that the data loss does not take place during the data type conversion, Option Strict keyword is used. It makes sure of the compile-time notification of the different types of conversions.

Option Explicit is the keyword that is specifically used in a file in order to explicitly declare all the variables by using declare keywords like Public, Dim, Private or Protected. If an undeclared variable name is included, an error will definitely occur during the compile time.

Briefly explain about the different types of threading models n Vb.net?

There are different types of threading models that are available, let us look into the Threading models that are common to win32 based environments.

SingleThreaded: It includes only one thread within the process, and it is responsible for performing all the work for the process. The process must be patient to wait for the completion of the current execution of the thread before it can start performing another action.

Apartment Threading (Single Threaded Apartment): Apartment threading includes multiple threads within the application. In a single-threaded apartment (STA), each thread is associated in a separate apartment under the process. The process can have various numbers of apartments that are capable of sharing the data through a proxy. The application will be defining when and for how long the thread in each apartment should perform the execution. All the requests will be serialized through the Windows message queue such that only a single apartment is allowed to be accessed at a time and thus only a single thread will be executed at any one time.

Free Threading (Multi-Threaded Apartment): Free threaded applications are specifically limited to the different programming languages such as C++ until the release of Microsoft .NET. The free threaded/Multi-Threaded Apartment (MTA) model has a single apartment created under a process rather than multiple apartments. This single apartment is responsible for holding multiple threads rather than just a single thread. There is no requirement of a message queue because all of the threads are a part of the same apartment and are allowed to share data without any proxy.

The developer must ensure that thread synchronization as part of the coding to make sure that the threads will not simultaneously access the same resources.

Illustrate the differences between a dataset and recordset?

A DataSet is used for representing the complete relational database in the memory, in the form of tables, relations, and views.A DataSet is specifically designed to ensure that the work is performed without any continued connection to the original data source.The Data in a DataSet can be loaded in bulk, rather than being loaded on demand.A dataset does not include the concept of cursor types.

The DataSets do not maintain any current record pointer You can use For Each loops in order to move along with the data.You are allowed to store many edits in a DataSet, and also write them to the original data source in a single operation.

By using the Data set, you are allowed to retrieve data from databases like SQL Server , and Oracle and also help them in managing one dataset, with a recordset this doesn't seem to be not possible.

The dataset is represented using XML while the recordset will make use of COM.

Recordset will not be allowed to be transmitted on HTTP while Dataset is allowed.

Briefly explain about the terms meta data and JIT?

Metadata: In simple terms, Metadata is considered as the data about the content of the data. The metadata is usually found in the catalog of libraries. In generic terms, metadata is used for analyzing data of databases and can also be used for other purposes as well.

JIT: JIT stands for Just in Time compiler. The JIT compiler can be used as a part of the runtime execution environment. There are three different types of JIT available and they are:

1.Pre-JIT: In the Pre-JIT, the compilation takes place at the time of deployment of an application.

2.Econo-JIT: The compilation takes place when methods are called during the runtime

3.Normal JIT: The normal JIT is responsible for performing the compilation of the called methods at runtime and they will get compiled when called for the first time.

Explain the dialog boxes used in the Windows form of Vb.Net?

There are 6 different types of dialog boxes used in Windows forms such as;

1. Color Dialog
2. Font dialog
3. Open File dialog
4. Print Dialog
5. Print preview dialog
6. Save File dialog

What are the main differences between functions and subroutines?

The functions in Vb.Net can help the function to send information back to where it has been called from. This Function return method can be used to perform a comparison in C++ or Java. The only difference with Sub Routines is that it cannot return values.

What is the object-oriented programming approach in the .net framework?

The object-oriented program offers a way to modularizing by creating a partitioned functional memory area. And also can be used as a data template for creating copies of such functional memory area. Object-oriented programming allows the decomposition of the problems into numerous data entities they called Objects. Then they built numerous data and functions around the objects.

What are the shared variables in Vb.Net?

Shared in Vb.Net declared as Shared variables, which are not associated with any specific instances of a structure or class, rather these variables are available to all the instances of the class or structure.

Explain the meaning of delegate in .NET?

A delegate in vb.net is very similar to a function pointer in C or C++ language. It allows the programmer to encapsulate a reference to a method inside a delegate object. Additionally, it can be used to create a custom event within a class.

What is garbage collection in the context of vb.net?

This is another frequently asked question at vb.net interviews. You need to explain that garbage collection is a low-priority process in vb.net that serves as an automatic memory manager. The main purpose of this is to manage the allocation and release of memory for the applications

What is Managed code?

Managed Code is used to run inside the CLR environment and it is called as .NET run time. All Intermediate Language (IL) are set to be Managed code.

What are the types of Authentication?

There are three types of Authentication and they are –

1. Windows Authentication
2. Forms Authentication
3. Passport Authentication

What is Authentication and Authorization?

Authentication is the process of obtaining credentials from the users and verifying the user’s identity. Authorization is the process of giving access to the authenticated resources. Authentication leads to Authorization.

What is TRACE in VB.Net?

TRACE allows the user to view how the code has been executed in detail. This tells how the code is working.

What is the difference between System.String and System.StringBuilder classes?

System.string class is non-updatable and it will create new string object instead of updating the same. But updation in the same string object is possible for String. Stringbuilder class. So, the operation on string builder is faster and efficient than the string class.

Why Datareader Is Useful?

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.]

What is the use of Option explicit?

Variable must be compulsorily declared when the Option Explicit is termed as ON. If it is OFF, variables can be used without declaration.

Search
R4R Team
R4R provides VB.Net Freshers questions and answers (VB.Net Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,VB.Net interview questions for experienced,VB.Net Freshers & Experienced Interview Questions and Answers,VB.Net Objetive choice questions and answers,VB.Net Multiple choice questions and answers,VB.Net objective, VB.Net questions , VB.Net answers,VB.Net MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for VB.Net fresher interview questions ,VB.Net Experienced interview questions,VB.Net fresher interview questions and answers ,VB.Net Experienced interview questions and answers,tricky VB.Net queries for interview pdf,complex VB.Net for practice with answers,VB.Net for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .