Information Module

 <  Day Day Up  >  

The Information module contains functions that provide information about values and exceptions.

 Public Function Erl() As Integer 

The Erl function returns the number of the last numeric label before an exception occurred.

Compatibility

The Erl function is provided only for backward compatibility and should not be used. The method System.Exception.StackTrace provides more comprehensive information about where an exception occurred.


 Public Function Err() As ErrObject 

The Err function returns an object that contains information about the last exception that occurred.

 Public Function IsArray(ByVal VarName As Object) As Boolean 

The IsArray function returns whether the value passed in is an array reference.

 Public Function IsDate(ByVal Expression As Object) As Boolean 

The IsDate function returns whether the value passed in is a Date value.

 Public Function IsDBNull(ByVal Expression As Object) As Boolean 

The IsDBNull function returns whether the value passed in is System.DBNull.Value .

 Public Function IsNothing(ByVal Expression As Object) As Boolean 

The IsNothing function returns whether the value passed in is Nothing .

 Public Function IsError(ByVal Expression As Object) As Boolean 

The IsError function returns whether the value passed in is an exception (i.e., inherits from System.Exception ).

 Public Function IsReference(ByVal Expression As Object) As Boolean 

The IsReference function returns whether the value passed in is a reference.

 Public Function IsNumeric(ByVal Expression As Object) As Boolean 

The IsNumeric function returns whether the value passed in is a numeric value. If the value passed in is a string, this function determines whether the string can be converted to a numeric value.

 Public Function LBound(ByVal Array As System.Array, _   Optional ByVal Rank As Integer = 1) As Integer 

The LBound function returns the lower bound of the specified rank of the given array.

 Public Function QBColor(ByVal Color As Integer) As Integer 

The QBColor function returns the RGB color code corresponding to the specified QuickBasic color code.

Historical

It is a reasonable question why this function still exists in Visual Basic .NET. Unfortunately, there is no good answer to that question!


 Public Function RGB(ByVal Red As Integer, ByVal Green As Integer, _   ByVal Blue As Integer) As Integer 

The RGB function returns the RGB color code corresponding to the specified red, green, and blue values. Although the three parameters are typed as Integer , each value must be between 0 and 255.

 Public Function SystemTypeName(ByVal VbName As String) As String 

The SystemTypeName function returns the .NET Framework type name for a Visual Basic .NET fundamental type. For example, SystemTypeName("Integer") returns the string System.Int32 .

 Public Function TypeName(ByVal VarName As Object) As String 

The TypeName function returns the fully qualified name of the type of the value passed in.

 Public Function UBound(ByVal Array As System.Array, _   Optional ByVal Rank As Integer = 1) As Integer 

The UBound function returns the upper bound of the specified rank of the given array.

Performance

If the array is one-dimensional, it is often faster to use the Length property of the array to calculate the upper bound. For example, the expression a.Length - 1 may be faster than the expression UBound(a) .


 Public Function VarType(ByVal VarName As Object) As VariantType 

The VarType function returns the equivalent COM Variant type of the given value.

 Public Function VbTypeName(ByVal UrtName As String) As String 

The VbTypeName function returns the Visual Basic .NET fundamental type name, if any, for a .NET Framework type. For example, VbTypeName("System.Int32") returns the string Integer .

 <  Day Day Up  >  


The Visual Basic .NET Programming Language
The Visual Basic .NET Programming Language
ISBN: 0321169514
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Paul Vick

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net