how to use byval in c#?
Basically, if you pass a reference by value, then you can change the object it refers to and these changes will persist outside the method, but you can't make variable refer to a different object and have that change persist outside the method. Parameters in C# are passed "ByVal" by default.