String is a reference type , so why we have to attach ref keyword ahead of string variable when we are passing in a function call for getting change in a main function
For ex:>
Update passing by reference as per comments below.
When you add the ref keyword in, you are passing by value passing a reference to the underlying value and can therefore, change the value of the data. A reference variable is like a pointer, not the value itself.