MethodInfo::ReturnType Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the return type of this method.

Namespace:   System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

property Type^ ReturnType {
	virtual Type^ get();

Property Value

Type: System::Type^

The return type of this method.

To get the return type property, first get the class Type. From the Type, get the MethodInfo. From the MethodInfo, get the ReturnType.

The following example displays the return type of the specified method.

using namespace System;
using namespace System::Reflection;
int main()
   Console::WriteLine( "\nReflection.MethodInfo" );

   // Get the Type and MethodInfo.
   Type^ MyType = Type::GetType( "System.Reflection.FieldInfo" );
   MethodInfo^ Mymethodinfo = MyType->GetMethod( "GetValue" );
   Console::Write( "\n{0}.{1}", MyType->FullName, Mymethodinfo->Name );

   // Get and display the ReturnType.
   Console::Write( "\nReturnType = {0}", Mymethodinfo->ReturnType );
   return 0;

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top