Get all parameters from within a function?

C

Cuperman

Hi All,

Is it possible to retrieve parameters from a function automatically,
to send to a log writing assembly? Something like:

Public Function myFunc(Param1 as String, Param2 as integer) as Boolean

WriteLogEntry(myFunc.Name & " " & myFunc.Parameters.Tostring)

'myFunc logic
Dim areWeStuck as Boolean = True
Return areWeStuck


End Function

I don't want to hard code the details as i want to get more
reusability
Thanks,
Mark
 
H

Herfried K. Wagner [MVP]

Cuperman said:
Is it possible to retrieve parameters from a function automatically,
to send to a log writing assembly?

Take a look at the 'MethodBase' class and its properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top