Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > read parameters through StackFrame

Reply
Thread Tools

read parameters through StackFrame

 
 
Random
Guest
Posts: n/a
 
      08-13-2007
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...").



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
get current StackFrame thru JDI Ken.C Java 1 02-07-2007 06:53 PM
Class Member Data and Member Function Parameters - Should Parameters Be Data Members? Jason C++ 2 05-13-2006 07:11 AM
StackFrame not working on Windows Server 2003 Joe Rattz ASP .Net 3 06-15-2005 02:19 PM
StackFrame.GetFileName() always returns null? Ben Fidge ASP .Net 0 01-15-2005 10:52 AM
Servlet parameters different from the command line parameters? Jonck van der Kogel Java 2 05-26-2004 11:34 PM



Advertisments