Take the 2-minute tour ×

Just had to perform some reflection and I noticed that MethodInfo had ReturnParameter, ReturnType and ReturnTypeCustomAttributes.

Now ReturnParameter contains the ReturnType and ReturnTypeCustomAttributes. So shouldn't ReturnType and ReturnTypeCustomAttributes be marked as deprecated? or am I missing a point in there purpose somewhere.

  • ReturnParameter was added in .net 2.0
  • ReturnType was added in .net 1.0
  • ReturnCustomAttributes was added in .net 1.0
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

ReturnParameter seems to be a wrapper over return type and attributes. Looks like it has been added for convenience of some sort:

Compiler designers can use the ParameterInfo object returned by this property to discover whether custom modifiers, such as IsConstModifier, have been applied to the return type.

Funny that IsConstModifier is deprecated itself.

So I'd continue using ReturnType.

(Just checked usage in system libraries used for the current project. ReturnParameter is used 8 times, ReturnType - more than 200).

share|improve this answer
Seems to me like a refactoring idea got into the API. Well at least that sums it up ReturnType is the common method. –  Dreamwalker Oct 7 '13 at 13:49
add comment

Your Answer


