Hi,
You can do that, example below:
Private Sub WeirdFunction(ByVal arg1 As Integer, ByVal arg2 As Integer,
ByVal arg3 As Integer)
Dim stFrame As New StackFrame
Dim currentMethod As System.Reflection.MethodBase = stFrame.GetMethod()
Dim currentParameters() As System.Reflection.ParameterInfo =
currentMethod.GetParameters()
For Each param As System.Reflection.ParameterInfo In currentParameters
Select Case param.Name
Case "arg1"
' do whatever
End Select
Next
End Sub
<di**********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Anyone know of a way to enumerate the argument list of a function in
VB.NET.
For example I have a Function add_user (u_id AS INT, u_first_name AS
VARCHAR(50), u_last_name AS VARCHAR(50)).
I want to be able to do something like this:
For each argument in add_user.argumentlist
Select Case argument.name
Case u_id
'Do This
Case u_first_name
'Do this
ETC.
Next argument