VB.NET, Is Object Returned by Reference from Function

后端 未结 3 1592
日久生厌
日久生厌 2021-01-05 17:31

This should be a fairly common question, but I haven\'t found a straightforward answer anywhere.

If I instantiate an object within a function in VB.NET and return it

3条回答
  •  伪装坚强ぢ
    2021-01-05 18:04

    VB.NET does not have the ability to return by reference. Neither does C# for that matter, but it has been proposed. What you actually get back is just a reference to the object. So to precisely define this it returns a reference to the object. It does not return by reference like what you might compare to the ByRef keyword.

提交回复
热议问题