C# Study

来源:互联网 发布:指弹中国淘宝店 编辑:程序博客网 时间:2024/05/08 15:11

Out vs Ref

The out keyword causes arguments to be passed by reference. This is like theref keyword, except thatref requires that the variable be initialized before it is passed.

Although variables passed as out arguments do not have to be initialized before being passed, the called method is required to assign a value before the method returns.