G
Guest
Hi,
I would like to obtain a list of a function's parameter's and their values
dynamically at runtime from within the function itself.
Currently, I record these when starting a function by 'hardcoding' them into
a collection. Please see my code snippet below. I use the collection in my
error handler which prints the values to a log file.
This works fine except for the fact that it's not dynamic.
I can get a function's parameters at runtime using reflection, but is it
possible to get their values dynamically too?
Best Regards,
Steve
'******************************************************
Public Sub DoSomething(ByVal MyString As String, ByVal myint As Integer)
'Record the initial state of the input parameters
Dim objInputVariablesInitialStateCollection As New Collection()
objInputVariablesInitialStateCollection.Add(MyString , "MyString")
objInputVariablesInitialStateCollection.Add(myint, "myint")
I would like to obtain a list of a function's parameter's and their values
dynamically at runtime from within the function itself.
Currently, I record these when starting a function by 'hardcoding' them into
a collection. Please see my code snippet below. I use the collection in my
error handler which prints the values to a log file.
This works fine except for the fact that it's not dynamic.
I can get a function's parameters at runtime using reflection, but is it
possible to get their values dynamically too?
Best Regards,
Steve
'******************************************************
Public Sub DoSomething(ByVal MyString As String, ByVal myint As Integer)
'Record the initial state of the input parameters
Dim objInputVariablesInitialStateCollection As New Collection()
objInputVariablesInitialStateCollection.Add(MyString , "MyString")
objInputVariablesInitialStateCollection.Add(myint, "myint")