User-1312727929 posted
Can I pass an external value to a global variable in a class? Right now, I do it like this:
Public Class myClass
Dim myGlobalVar as string
Public Function myFunction(myVar as string)
myGlobalVar=myVar
...
End Function
End Class
As you see, I am using two variables, and assign the value of the local variable to the global variable in the function. I wonder if you can do this more efficient, i.e. using only one variable.