【转载】#273 - Parameter Modifier SummaryHere's a summary of the different parameter modifiers and how the behavior changes for each, when using them with value-typed and reference-typed variables.
No modifier - value typesCopy of value passed to methodMethod can read valueNo modifier - reference typesReference to object passed to methodMethod can read/write object contentsref modifier - value typesReference to variable passed to methodMethod can read/write variableref modifier - reference typesReference to object reference passed to methodMethod can read/write object contentsMethod can change reference to point to new objectout modifier - value typesReference to variable passed to methodMethod must write new value to variableout modifier - reference typesReference to object reference passed to methodMethod must change reference to point to new object原文地址:#273 - Parameter Modifier Summary