VB.NET Tutorial

<<Previous  Next>>
What are the features of C# which are not present in VB.NET?

Latest answer: In C# the line ends when the semicolon is typed.
Therefore, when a SQL statement is copy pasted, there won’t be any error, unlike VB............
Read answer

Explain the concepts of keyword Must Inherit in VB.NET.

Latest answer: Class methods and properties must be stated as Overridable to allow inheritance. Also if a class has to inherit from a base class, it must state the methods that are overridden with the Overrides keyword.............
Read answer

What is Anonymous type in VB.NET? Explain its features.

Latest answer: Anonymous type in VB.NET allows data types to be created from the code that requires it. They should be stored in variables declared with the keyword VAR.............
Read answer

What is non_deterministic finalization?

Latest answer: An ability to determine when a data object would be subjected to garbage collection is known as deterministic finalization. When it can’t be determined it is known as non deterministic finalization.............
Read answer

What is different between Web.Config and Machine.Config?

Latest answer: machine.config supports configuration file section for all applications in IIS.
web.config contains security policy..................
Read answer

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

Latest answer: Xcopy technique is to simply copy your web application files to the production server hard drive and set a virtual directory there............
Read answer

What is STA in .NET?

Latest answer: Single-threaded apartments or the apartment model process offers a message-based paradigm for dealing with multiple objects running concurrently............
Read answer

Explain how to store and retrieve images in SQL server database through VB.NET.

Latest answer: a. Create a table for storing images:
CREATE table MyTable (myImage image)
b. Create procedure for storing image in the table create procedure SaveImage(@getImage as image) as insert into MyTable (sampleimage) values (@getImage)...........
Read answer

Interview questions and answers on .Net web service


VB.NET Tutorial by Nishant Kumar
  • VB.NET is a major component of Microsoft Visual Studio .NET suite.
  • VB.NET is improved version of VB 6 with many additional features.
  • Being part of VS.net suite, VB.NET can access a common .NET library and support all CLS features.
  • VB.NET is a full object oriented language which support inheritance, overloading, interfaces, shared members and constructors. 
  • .Net Framework is a primary element for software development in VS.Net suite.
  • .Net Framework includes loads of code required for application development.
  • .Net Framework is divided into CLS (Common language Runtime) and Base class Library.
  • CLS provides many service required for execution of application developed in .Net platform.
  • Base Class library has many pre-developed classes that can be used by developer. -Base Class library is organized into namespaces.
  • Assembly is primary unit of .Net application.
  • Assembly contain manifest which describes the assembly and its modules.
  • Modules contain source code for the application.
  • An assembly may exist in the form of DLL or .Exe.
  • An assembly is stored as an intermediate language (IL) file. Before running, the assembly goes through security check against the local system. After having cleared from security check, it gets loaded into memory and compiled into native code by JIT compiler.
  • A variable in .Net can be of two types.
  • Value type and reference type.
  • Value type contains data of the type whereas reference type contains pointer to an instance of an object of that type.
  • Value type is created at the time of declaration whereas reference type must be instantiated after declaration to create object.
  • If we assign a reference type variable to another reference type variable, only reference to the object is copied, not value and both the variable will refer to the same object.
  • Use of Import or Using keyword will allow to reference to member of a namespace. Classes and structures contain data and methods. Methods perform data manipulation and provide behavior to classes and structures.
  • Method can return values. The method which returns value is called Function and which doesn’t return value called Subs.
  • Method can have parameters that are passed by value by default. We can pass parameters by reference with the ref keyword in C#.net and byref in VB.Net.
  • The constructor is like any method of the class, but gets created before the object is available for use. This is the first method to get called on the instantiation of the class.
  • The Destructor is called just before an object is destroyed. It is used for code clean-up when object is no longer in use. Developer has no control when a destructor is called, since it gets called by CLR.
  • .Net Framework provides utility like Garbage collection.
  • The Garbage Collection is responsible for automatic memory reclamation when object is more in use.
  • The Garbage Collection is a low-priority thread that runs in the background of the application.
  • The GC gets high priority when memory resource is scarce.
  • We should remember that GC is called by CLR, so developer has no control when GC is called. So, we shouldn’t rely on the code placed inside destructors or finalizers. If we need to reclaim recourses urgently, we can use dispose () method which can be called explicitly.
  • The GC also get ride of circular references, commonly known as memory leak.
  • Form is the basic unit of user interface. We can add form in the application at design time or run time. We can create one general parent form and can inherit forms from parent form using visual inheritance. While using visual inheritance, we ensures uniform look to all the forms of the application.
  • Forms have various properties that control their appearance, namely text, font, cursor, backgroundImage, Opacity, backcolor and forecolor.
  • Forms have various intrinsic methods like Form.show, form.showdialog, form.activate, form.hide and form.close.
  • Form’s intrinsic methods causes change in the visual interface and various events get raised like load, activated/deactivate, visiblechanged, closing, closed.
  • We can also create our own event handler which will get called when associated event is raised.
  • Each control on the form can have order of navigation which can be set using tabindex property of the control.
  • A control can contain other controls. For example panel, groupbox and tabpage.
  • We can resize and change position of the form and controls on it, manually. We can make use of docking and anchor properties for automatic resizing and positioning of the controls as we change size or position of the form.
  • Dock property ensures the controls to an edge of the form on change in size or repositioning of the form.
  • Anchor property ensures if controls should be fixed, floats, or change size in response to the change in size of form.
  • We can create control at run-time by declaring control and instantiating of the type. We can then add instantiated control to the control collection of the form.
  • Each control’s property on the form can be enhanced by using Extender Provider component. These properties mostly used to provide information to the user like help or tool tip.
  • Menu is the best navigation way in the application. We can create MainMenu control that allows rapid creating of menu for the application. Developer can apply separator bars, access keys and shortcut keys.
  • Context menu allows us to get access to various commands on the specific situation.
  • Developer can create this kind of menu same as MainMenu but at run-time.
  • We can control the menu dynamically at run-time. We can enable and disable the menu items, make menu items invisible etc. We can change the structure of menu dynamically at run-time by creating new menu with the CloneMenu method.
  • We can have form-level validation as well as field level validations.
  • We can validate each field as data entered using field-level validation.
  • We can validate all fields of the form at one shot using form-level validation.
  • The textbox control contains properties like MaxLength, PasswordChar, ReadOnly, Multiline. These properties are used to restrict user to enter unwanted data in the field. Developer can tap keyboard events of the control like Keydown, KeyUp and Keypress.
  • Developer can validate character input by using static methods of char structure like char.IsDigit, CharIsletter, Char.Islower, Char.IsUpper etc.
  • The CauseValidation property of the control allows us to disable the event to occur. The event occurs only when CauseValidation property of the control is set to true.
  • We can set CancelEventArgs.Cancel property to true in the event handler to restrict focus from moving away from the control.
  • The ErrorProvoider component of the control can be used at run time for displaying informative error message to the user.

<<Previous  Next>>    

Windows authentication.

If windows authentication mode is selected for an ASP.NET application, then authentication also needs to be configured within IIS since it is provided by IIS............

ASP.NET 2.0 Security Controls

With ASP.NET 2.0, things have changed for the better. For security-related functionalities, ASP.NET 2.0 introduces a wide range of new controls..............

Model View Controller

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

Overview of ADO.NET architecture.

Data Provider provides objects through which functionalities like opening and closing connection, retrieving and updating data can be availed.............

Use of data adapter

The data adapter objects connect a command objects to a Dataset object..............

Steps involved to fill a dataset

We fill it with data fetched from the data store. Once the work is done with the dataset, connection is reestablished and the changes are reflected back into the store................


 


Write your comment - Share Knowledge and Experience


Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring