VB also comes with some built-in or intrinsic functions that are not methods of any class. We have already been using some of these in doing data type conversion. When you write:
TextBox1.Text = Cstr (15)You are calling the intrinsic Cstr function.
There is just a slight syntax difference between calling intrinsic functions and functions that are methods of a class: you can use the function name without a class name.
While most of the functions in VB are methods of a class, there are other intrinsic functions. For example, the pmt function is one of several financial functions, and its arguments are the interest rate of the loan, the number of payment periods it runs for and its principle.
Function | Returns | Syntax | Data type | Number of Arguments |
---|---|---|---|---|
pmt | loan payment amount | pmt (<numeric expression>, <numeric expression>, <numeric expression>) | double | 3 |