Answer Posted / ashwini
When arguments are passed to a method ByVal i.e. By Value
then the original value of a variable is not passed but its
copy is created and that copy is passed. So whatever
changes are made, they will affect the copy but not the
original value of a variable.
When arguments are passed ByRef i.e. By Reference
then the argument's memory location is passed to a method.
So changes made to that argument's value will actually
affect the original value.
| Is This Answer Correct ? | 31 Yes | 1 No |
Post New Answer View All Answers
What is the advantage of generics in c#?
Can we have static indexer in c#?
How do I create a multilanguage?
What does ienumerable mean?
What is difference between internal and protected internal in c#?
What is the advantage of constructor?
What method is used to sort the elements of the array in descending order?
How is method overriding different from overloading?
What is the difference between “dispose” and “finalize” variables in c#?
What is the function of the not null constraint?
Is c sharp and c# are same?
How to override a function in c#?
Is c# or c++ better for games?
Why do we use class in c#?
Can we have multiple threads in one app domain?