N
Nikolay Petrov
I am implementing a logging facility for my app, and I am looking for a
way to iterate through the parametersm passed to a method.
Something like:
Sub Test(byval ABCD as string, byval EFGH as integer)
Try
' Some Code
Catch ex as Exception
'Code to find what types are the two parameters
' and do some stuff with them like logging or something
End Try
End Sub
Of course I know that this method has two patamaters and what is their
type, but I want to write independent code, which will work for every
method. My best guess is for using reflection, but I don't know how to
reference the method's parameters.
Any ideas?
tnx
way to iterate through the parametersm passed to a method.
Something like:
Sub Test(byval ABCD as string, byval EFGH as integer)
Try
' Some Code
Catch ex as Exception
'Code to find what types are the two parameters
' and do some stuff with them like logging or something
End Try
End Sub
Of course I know that this method has two patamaters and what is their
type, but I want to write independent code, which will work for every
method. My best guess is for using reflection, but I don't know how to
reference the method's parameters.
Any ideas?
tnx