
Passing a variable parameter to a function
Quote:
>My challenge is that I would like to pass different udt's to this same
>function without converting them to byte arrays or strings first. Is this
>possible? Any
>ideas?
Stream of consciousness starting...
I'm not sure if there's any way to do this. You can't overload functions in
VB. You can't declare an argument as a variant and pass it a UDT.
But....
You should be able declare each UDT as a class and then declare your
function to take an Object. Better yet, have each class (UDT) implement the
same interface - one of your interface members would be a function that
returned a copy of itself, but in a byte array or string. Alternatively
(but similarly), you could do away with the classes and interfaces and just
define a function for each UDT that would return the UDT as a byte array or
string.
Andrew