What is passed by ref and by value?
When we make a call to the method, we may pass some values in the parameter list. When we pass the actual value of the variable, it simply pass the copy of the variable not actual value. Hence change in the copy of that variable will not affect the actual value of that variable.
When we passed the object reference into the parameter list in to a method call, we are actually passing the copy of bits that refer to the object somewhere into the memory not actual value of the object. If we modify the object using the reference of that object will also affect the actual value of that passed object.