On Aug 22, 2006, at 10:47 AM, Jan Erik Moström wrote:

This is actually what I'm trying to hide with this coding style, the purpose of this class is to handle this conversion for some specific data.

The other option is to not overload the method, and have something like this:

    Function getInteger(name as String) As Integer
    Function getString(name as String) As String

The advantage of the Variant method is that you do not need to know the stored type before you call the function... since the Variant will automatically convert to the variable type it is being copied to.

It would be nice to allow overloading of return parameters, but I have a feeling that that would result in far more ambiguous code; for example which function should be called with the following?

    Dim v As Variant = get("piff")    // Integer or String function????

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to