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
What is the use of generics in c#?
What floating point types is supported in C#?
What is the signature of a method?
Why do we use overloading in c#?
What is dynamic dispatch?
What does question mark mean in c#?
Why do we use classes?
Describe the process of “exception handling implementation” in c#?
Which attribute is used in order that the method can be used as webservice?
What is uint64?
What are the characteristics of c#?
How to open a new form on button click in Windows forms?
Differentiate between response.expires and response.expiresabsolute?
What is a method c#?
Is c# code is unmanaged or managed code?