Archive for category VB.NET

How to: Define a Namespace in VB.NET

A namespace designates a collection of programming elements, organized and classed for grouping operations and easy access. At the namespace level, the programming elements include:

  • Classes of objects [...];
  • Structures [...];
  • Modules [...];
  • Interfaces [...];
  • Delegates [...];
  • Enumeration [...];
  • Other namespaces.

Read the rest of this entry »

, , , ,

2 Comments

How to: Define and Use a Structure in VB.NET

The structure is a programming entity similar to classes [...]. The difference is that structures are value types while classes of objects are reference types.
A value type variable is declared and the space according to said data type is allocated at the execution time. Value type variable is destroyed when leaving the block where it has been defined.
Read the rest of this entry »

, , , ,

1 Comment

How to: Implement Interfaces in VB.NET

Implementing an interface in VB.NET is done by specification Implements. Interfaces can be implemented by classes [...] and structures [...]. A class or structure can implement one or more interfaces, separated by the operator , in VB.NET.
List of interfaces implemented by class/structure is given by their associated names at defining time [...].
Read the rest of this entry »

, , , ,

No Comments

How to: Define Interfaces in VB.NET

The interface is a set of definitions of properties, methods and events. Unlike classes [...], interfaces do not contain the implementation. Interfaces are implemented [...] by classes, but are defined as separate entities.
A class that implement an interface must implement all elements defined in that interface.
Read the rest of this entry »

, , , ,

No Comments

How to: Transmit the Message Assigned to an Event Defined in VB.NET

Appearance of an event and transmission of its message is accomplished by specification RaiseEvent.
Specification RaiseEvent is used only for events declared explicitly.
Use RaiseEvent specification is exemplified in the following source code sequence developed in VB.NET:
Read the rest of this entry »

, , , ,

No Comments

How to: Define Events in Classes Built in VB.NET

Declaring events in a class built in VB.NET is done using Event specification. Defining event involves assigning the name and arguments providing.
Because an event is included in a class, the objects defined on that class may send messages related to event – raise. Transmission is accomplished by specification RaiseEvent. Assigning the event to procedure for event handling is done by specifications Handles or AddHandler [...].
Read the rest of this entry »

, , , ,

No Comments

How to: Define Delegates in VB.NET

The delegate is a pointer that allows the call of a function indirectly through its memory address. The delegate is used to call methods of other objects. It is similar to the function pointer used in other programming languages. The difference is that the delegate is a reference type on System.Delegate class.
Read the rest of this entry »

, , , , ,

No Comments

How to: Identify Characteristics of Events in VB.NET

The event is a message sent by an object and announces the application of production a fact.
Events are implemented using delegates [...].
For example, clicking a command button in a graphical interface causes the appearance of the event Click. The event is treated by a procedure.
Read the rest of this entry »

, , , ,

No Comments

How to: Define a Class in VB.NET

Class is an abstract representation of an entity. The object is a concrete manifestation of a class. The object is the structure that contains data and methods of handling data. An object contains data through fields and properties:
Read the rest of this entry »

, , , , , ,

1 Comment

How to: Use Data Types to Define Variables in VB.NET

Data types associated to the variables establish the content of data and size of areas used to store data. In VB.NET, the following data types are available for software developer:
Read the rest of this entry »

, , , ,

1 Comment