Why would ref be used for array parameters in C#?
问题 I read the page Passing Arrays Using ref and out (C# Programming Guide) and was wondering why we would need to define an array parameter as a ref parameter when it is already a reference type. Won't changes in the callee function be reflected in the caller function? 回答1: Won't changes in the callee function be reflected in the caller function? Changes to the contents of the array would be reflected in the caller method - but changes to the parameter itself wouldn't be. So for example: public