Byval and Byref have just understood today.

xiaoxiao2021-03-06  25

I used to read a book, write two parameters of VB. Byval and Byref Byval called "pass value", want to replicate a value into a new variable. Byref is called an address, which is equivalent to passing the address of the original variable over. However, today I found that byref's inventory is not equivalent to a pointer address in C , but is equivalent to the reference in C . That is to say, in C , pass the parameters, there are three ways: Void ABC (INT A) {} Void ABC (INT & A) {} in VB, there are two: SUB ABC (Byval A as Integer) wants to be void ABC (INT A as integer) wants to be void ABC (int & a) {} in VB6, if not writing byval or byref , Default is Byref, in VB.NET, default is ByVal

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

New Post(0)