I\'m not sure if I\'m totally missing something here but I can\'t find any way to determine if a parameter is passed by reference or not by using reflection.
Argumen
You need to examine the type of your parameter further. For example if you have
void Foo(ref int bar)
then the name of the parameter wouldn't be int
or Int32
(as you might have expected) but instead Int32&
. For every type there is a correspondent by-ref-type where the original type is suffixed by a '&'.
You can check this via the IsByRef
property of the Type
class.