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
Explain types of comment in c# with examples
What is the difference between a private assembly and a shared assembly?
What is orm in c#?
How do generics work in c#?
What is difference between ienumerable and list in c#?
How do I do implement a trace and assert?
is it possible to access a remote web service Without UDDI?
How many types of delegates are there in c#?
Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.
How long does it take to get a loop recorder put in?
What are generics in c#.net?
Can c# inherit multiple classes?
Explain the role of Garbage collector and its generations?
What is parseexact c#?
Can we inherit a private class in c#?