C# ParameterInfo IsRetval

Description

ParameterInfo IsRetval Gets a value indicating whether this is a Retval parameter.

Syntax

ParameterInfo.IsRetval has the following syntax.


public bool IsRetval { get; }

Example


using System;// ww w . j  a  v  a 2s .  c o  m
using System.Reflection;
using System.Threading;
using System.Reflection.Emit;

public class ParameterInfo_IsIn_IsOut_IsOptional
{
   public static void Main()
   {
      Assembly[] myAssemblies = Thread.GetDomain().GetAssemblies();
      Assembly myAssembly = null;
      Type myType = myAssembly.GetType("MyType");
      MethodBase myMethodBase = myType.GetMethod("MyMethod");
      ParameterInfo[] myParameters = myMethodBase.GetParameters();
      for(int i = 0; i < myParameters.Length; i++)
      {
         Console.WriteLine(myParameters[i].IsRetval);
      }
   }
}




















Home »
  C# Tutorial »
    System.Reflection »




EventInfo
FieldInfo
MemberInfo
MethodInfo
ParameterInfo
TypeInfo