Difference between DIM and Private in VB

xiaoxiao2021-03-06  44

DIM means the meaning of statement, and private is private, DIM is only used to declare variables, because the default statement of variables is private, so DIM and private are basically the same on the declaration variable. Private and public refers to the type of access to variables, procedures, and functions. It is not only used for variables, but also for objects, processes, functions.

Such as: Private function add (A1 AS Integer, A2 As Integer) AS Integer

Add = a1 a2

END FUNCTION

The add function can only be called in the defined module.

转载请注明原文地址:https://www.9cbs.com/read-71426.html

New Post(0)