Difference between ByVal and ByRef?

Answer Posted / bhaskar

ByVal means only the value is passed to the calling function
but.. modifications will not reflect the original value..

ByRef means the address where the value stored is passes to
the calling function so the modifications made are reflected
to the original value..

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of generics in c#?

505


How do you create empty strings in c#?

520


Is c# and .net same?

496


What is generic method in c#?

497


What are collection classes?

488






What is difference between singleton and static class in c#?

484


You are creating a custom usercontrol, some of the newly created properties are shown in the properties window. How you can hide a new property named theme from the properties window?

505


What is an assembly in .net?

577


What are the three types of operators?

475


Write a short note on interface?

587


What is the difference between struct and class in c#?

478


Can we overload the main method in c#?

480


What is overloading in c#?

483


What is readline c#?

492


What is object pool in .net?

537