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
How many types of variables are there in c#?
What is overriding in c#?
What are the steps to create an assembly and add it to the gac?
Why do we need indexers in c#?
What are the variables in c#?
What is a function c#?
What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?
Is as keyword in c#?
What is difference between write and writeline?
What is delegates in c# and uses of delegates?
Explain static class members.
Why do we need indexer in c#?
Define c# i/o classes?
What's the c# syntax to catch any possible exception?
Why do we use delegates?