R
Random
I'm trying to figure out a way to read parameter values from a prior
function call in the StackFrame. I know reflection won't let me do this, it
wasn't designed to do anything but report on static data, but is there
another way?
What I'm looking for is to do something similar to the following...
Public Class MyClass
Inherits MyClassBase
Function GetFoo(arg1 as string, arg2 as string) as Foo
Return MyBase.FindFoo()
End Function
End Class
Public Class MyClassBase
Function FindFoo() As Foo
(this function would need to read the calling function parameter
values to determine what it returns)
(this function would be called by many functions in the inherited
class, which is why I'm not passing the parameters directly)
End Function
End Function
I'm thinking I could pass in a ParamArray, but I'd like to avoid doing that
if possible. I'd like to avoid requiring any effort on the part of a
developer writing new methods in the MyClass class (e.g. "always include
these lines of code in your function...").
function call in the StackFrame. I know reflection won't let me do this, it
wasn't designed to do anything but report on static data, but is there
another way?
What I'm looking for is to do something similar to the following...
Public Class MyClass
Inherits MyClassBase
Function GetFoo(arg1 as string, arg2 as string) as Foo
Return MyBase.FindFoo()
End Function
End Class
Public Class MyClassBase
Function FindFoo() As Foo
(this function would need to read the calling function parameter
values to determine what it returns)
(this function would be called by many functions in the inherited
class, which is why I'm not passing the parameters directly)
End Function
End Function
I'm thinking I could pass in a ParamArray, but I'd like to avoid doing that
if possible. I'd like to avoid requiring any effort on the part of a
developer writing new methods in the MyClass class (e.g. "always include
these lines of code in your function...").