Answer Posted / priya
If you want to pass the value of the variable, use the
ByVal syntax. By passing the value of the variable instead
of a reference to the variable, any changes to the variable
made by code in the subroutine or function will not be
passed back to the main code. This is the default passing
mechanism when you don’t decorate the parameters by using
ByVal or ByRef.
If you want to change the value of the variable in the
subroutine or function and pass the revised value back to
the main code, use the ByRef syntax. This passes the
reference to the variable and allows its value to be
changed and passed back to the main code.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How to force my .net app to run as administrator on windows 7?
What is difference between web and window application?
What is the use of private constructor in c#?
In which situation(s), the use of "Delegate" is a good idea?
What is xml serialization in c#?
Can abstract class instantiated c#?
What is using keyword?
How does array sort work?
What is the use of parse in c#?
What is private class in c#?
What is the purpose of private constructor in c#?
What is difference between write and writeline in c#?
what is the purpose of using statement in c#
What is difference between C# and VB.NET?
What is gac? How to put assembly in gac?