19-Functions

0
296

This Visual Basic Tutorial is all about Functions.
A procedure is a method that perform a task when it’s called.

 

There are two types of procedures in VB.Net and they are:

 

Functionsreturn a value

Sub procedures or Subsdo not return a value

 

What is a Function? The Function statement is composed of  the name, parameter and the body of a function.

This is the syntax  in performing the Function statement:

  1. [<em>Modifiers</em>] Function <em>FunctionName</em> [(<em>ParameterList</em>)] As ReturnType
  2.  
  3. Statements.......
  4. End Function

Where,

Modifiers: it specify the access level of the function and its values are:

 

Public, Private, Protected, Friend, Protected Friend and information concerning  overriding,overloading, shadowing and sharing.

 

FunctionName: point out the name of the function

ParameterList: identifies the list of the parameters

ReturnType: identifies the data type of the variable the function returns

 

 

 

 

Readers might read also:

 

Facebook Comments
(Visited 29 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here