I never saw that problem as I follow the advice of Steve McConnell in Code Complete. He recommends to never do Return Function() because you can't see what the return value of Function is until it's too late. His suggestion is write the code similar to how you fixed it.
>Some of you probably already knew this, but it caught me off guard...
>
>I have a sublass of a base class, and in a method on the subclass I added local code which did some work, and then invoked DoDefault() to active the base class code and then I was attempting to Return (from the subclass) the return value that I got back from the base class default code.
>
>
>Subclass.SomeMethod()
>
> Lparameters tcSomeString
>
> *Misc code here
>
> Return DoDefault(tcSomeString)
>
>
>
>
>Baseclass.SomeMethod()
>
> Lparameters tcSomeString
>
> *Misc code here
>
> Return _tally
>
>
>So, you can see that baseclass was returning an integer (_tally), which I was attempting to return again in the subclass, but instead the subclass was returning .T. ( a bool). I did not know this is what would happen.
>
>Here is the change I had to make for it work correctly.
>
>
>Subclass.SomeMethod()
>
> Lparameters tcSomeString
>
> Local lnReturn
>
> *Misc code here
>
> lnReturn = DoDefault(tcSomeString)
>
> Return lnReturn
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer