By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

Get passed in parameters

P: n/a
Hello,

I would like to ask wheter it is possible to get the names of the
parameters that were used to call a method.
For example:
Public Sub Caller()
dim int1 as integer
dim int2 as integer
Callee(int1, int2)
End Sub
Public Sub Callee(firstnumber as integer, secondnumber as integer)
'Here I want something so I can display
' The first Integer passed in was called 'int1'
' The second integer passed in was called 'int2'
End Sub
I know that by Reflection I can get the parameter names of
callee(firstumber and secondnumber)
I also know that if Caller would have parameters I could retrieve their

names, but what I want is the name of the local variables in caller.
I'm not sure wheter it's possible, my guess is that it's not because
they are 'local variables' and are out of scope once callee is called.
Anyone who knows if it is possible or not, your help is aprreciated.
With kind regards,
Kenneth

Mar 24 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.