阅读背景:

将数组变量和其他变量传入和传出VB.Net子例程方法

来源:互联网 

I am in the process of transcribing code, which manipulates arrays of complex numbers, from VB 6 to VB.Net form. The language syntax has become more strict and I have studied the use of the ByVal and ByRef keywords quite carefully so that I can either not change or change the variables passing through the method subroutine as I require. However it seems that VB 6 used to allow me to pass null variables into the subroutine and to receive changed (internally calculated) variables back in the call line. VB.Net does not seem to allow null variables to be passed into a method subroutine as a rule? In the code snippet that I share below I can only avoid invoking a null exception by arbitrarily setting initial values to parameters that are actually really defined in the method subroutine. Is there a way to avoid this inelegant overhead?I am in the process of transcribing code, which




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: