MethodInfo.ReturnType Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the return type of this method.
Assembly: mscorlib (in mscorlib.dll)
The following example displays the return type of the specified method.
Note: |
|---|
To run this example, see Building examples that have static TextBlock controls for Windows Phone 8. |
Imports System.Reflection Class Example Public Shared Function Demo(ByVal outputBlock As System.Windows.Controls.TextBlock) As Integer outputBlock.Text &= ControlChars.Cr + "Reflection.MethodInfo" & vbCrLf 'Get the Type and MethodInfo. Dim MyType As Type = Type.GetType("System.Reflection.FieldInfo") Dim Mymethodinfo As MethodInfo = MyType.GetMethod("GetValue") outputBlock.Text += ControlChars.Cr _ + MyType.FullName + "." + Mymethodinfo.Name 'Get and display the ReturnType. outputBlock.Text += String.Format(ControlChars.Cr _ + "ReturnType = {0}", Mymethodinfo.ReturnType) Return 0 End Function End Class
Show:
Note: