Click to See Complete Forum and Search --> : How do I pass a parameter to a function if I don't know its type in advance ?


Robert Chu
09-30-2006, 01:38 AM
Hello,
If I have a function as follows, but I don't know the type of the parameter. How can I declare it ?

Function test(paTest as ???)

End Function

Cstick
10-08-2006, 08:37 PM
Function test(paTest as Object)
Dim t As Type = GetType(paTest)

Select Case t
Case is GetType(String)

Case Is GetType(Integer)

End Select
End Function