in vb.net compact framework 3.5 possible list of parameters passed method?
for example,
private sub testsub(param1 string, param2 integer, param3 list(of string) 'get list of parameters end sub
is possible names of parameters , populated @ point says 'get list of parameters
any appreciated.
thanks
take @ https://msdn.microsoft.com/pt-br/library/system.reflection.methodbase.getcurrentmethod(v=vs.110).aspx , https://msdn.microsoft.com/pt-br/library/system.reflection.methodbase.getparameters(v=vs.110).aspx further information.
but i'm assuming you're looking this:
private function getparameters(byval info methodbase) string dim lst = info.getparameters() dim strparameters string = "" each item in lst if strparameters <> "" strparameters += "," strparameters += item.name next return strparameters end function
and invoke:
private sub testsub(byref string, byref b string) dim strparameters string = getparameters(system.reflection.methodbase.getcurrentmethod()) end sub
the return should "a,b".
best regards.
Comments
Post a Comment