>Question : How do to detect caller type inside a method ?
The short answer is that you can't.
You could use overloaded functions and a ByRef parameter to return the
result instead.
Sub MyFunc(ByRef ds As Dataset)
Sub MyFunc(ByRef i As Integer)
....
Dim oDS As Dataset
MyFunc(oDS)
Or you could follow the pattern used by some framework classes, and
use separate methods for each possible return type
Function MyFuncDataset() As Dataset
Function MyFuncInt32() As Dataset
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.