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
Why do we use struct in c#?
What's the difference between class and object?
What's the difference between abstraction and encapsulation?
Is datetime a value type in c#?
Why do we use ienumerable in c#?
How do you set a class path?
What is private void in c#?
What are the different types of constructors in c#?
How do I declare inout arguments in c#?
What is a namespace server?
What is iqueryable?
How do I register my code for use by classic com clients?
When would you use generics in your code c#?
What is lastindexof c#?
How do I do implement a trace?