Can a function return a value byref instead of the default byval? That is to say, allow me to directly edit the variable that it is retrieving instead of just giving me a copy of that variable.
Right now I’m trying to write a function that will return, based on what the user has selected through a combobox, a particular setting (eg. My.Settings.somethingHere). I then want to be able to edit the setting directly through just calling the function. Is that at all possible?
private function myFunction() as byte
select case comboBox1.text
case "a"
return my.settings.a
case "b"
return my.settings.b
end select
end function
private sub something()
myFunction() -= 1
end sub
Function can’t return reference of byte instead you may create property (Writable) to assign value.
and assign value to Change property,