【转载】#273

王朝学院·作者佚名  2016-05-16
窄屏简体版  字體: 小  |  中  |  大  |  超大  

【转载】#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

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航