Qus:    What is the purpose of ByVal keyword in VB.NET?
Mar 04, 2021 11:39 2 Answers Views: 48 SAI
Prev Next
Answers (2)
PARTH Mar 06, 2021 00:30
Answer:   You pass an argument by value by specifying the ByVal keyword for the corresponding parameter in the procedure definition. When you use this passing mechanism, Visual Basic copies the value of the underlying programming element into a local variable in the procedure.

KRISHNA SWAROOP Mar 06, 2021 08:57
Answer:   ByVal means that we are passing a copy of a variable to our method or function. The purpose of using ByVal keyword in VB.NET is to preserve the original variable and not allowing its value to be getting altered.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect