Hi,
I need to inspect methods through reflection to discover if for a
method's parameter ref modifier was used. I noticed that in
ParameterInfo class a property isOut is available but I don't know how
to discover if a ref parameter has been defined.
Thank you in advance
Marco
Mattias Sj?gren - 13 May 2004 12:32 GMT
> I need to inspect methods through reflection to discover if for a
>method's parameter ref modifier was used. I noticed that in
>ParameterInfo class a property isOut is available but I don't know how
>to discover if a ref parameter has been defined.
propertyInfo.PropertyType.IsByRef
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Fabian Schmied - 13 May 2004 12:36 GMT
M P schrieb:
> I need to inspect methods through reflection to discover if for a
> method's parameter ref modifier was used. I noticed that in
> ParameterInfo class a property isOut is available but I don't know how
> to discover if a ref parameter has been defined.
Hm, you could check the ParameterInfo.ParameterType.IsByRef. If that's
true and ParameterInfo.IsOut is false, it should be a ref parameter.
Fabian