Click here to Skip to main content
15,911,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
(ByVal o As Object, ByVal e As CommandEventArgs)
Posted

I'm not good at explaining but I'll try.. (so other CPians out there, correct me if I'm wrong.)

[ByVal o as Object] -- I usually use this in a function. Example..
VB
Public function sum (ByVal Num1 as integer, num2 as integer) as integer
sum = Num1 + Num2
return sum
end function

[ByVal e as CommandEventArgs] -- I usually use this to replicate an event by using AddHandler (or EventHandler).

ByVal (means ByValue) returns the exact value.
ByRef (means ByReference) returns the value from the data storage where the variable points at.

You can see that phrase as a default when you double click an object from the Designer view. And also by default, it is always ByVal.
 
Share this answer
 
check out:

Click here

Hope it helps :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900