This documentation is archived and is not being maintained.

IMethodCallMessage.InArgs Property

Gets an array of arguments that are not marked as out parameters.

Namespace:  System.Runtime.Remoting.Messaging
Assembly:  mscorlib (in mscorlib.dll)

Object[] InArgs { get; }

Property Value

Type: System.Object[]
An array of arguments that are not marked as out parameters.


The immediate caller makes the call through a reference to the interface and does not have infrastructure permission.

Although the InArgs property is redundant since the same functionality can be achieved with the InArgCount and GetInArg methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved.

   public override IMessage Invoke(IMessage myIMessage)
      Console.WriteLine("MyProxy.Invoke Start");
      ReturnMessage myReturnMessage = null;

      if (myIMessage is IMethodCallMessage)
         Console.WriteLine("Message is of type 'IMethodCallMessage'.");

         IMethodCallMessage myIMethodCallMessage;
         Console.WriteLine("InArgCount is  : " + 

         foreach (object myObj in myIMethodCallMessage.InArgs)
            Console.WriteLine("InArgs is : " + myObj.ToString());

         for(int i=0; i<myIMethodCallMessage.InArgCount; i++)
            Console.WriteLine("GetArgName(" +i.ToString() +") is : " + 
            Console.WriteLine("GetInArg("+i.ToString() +") is : " +
      else if (myIMessage is IMethodReturnMessage)
         Console.WriteLine("Message is of type 'IMethodReturnMessage'.");

      // Build Return Message
      myReturnMessage = new ReturnMessage(5,null,0,null,

      Console.WriteLine("MyProxy.Invoke - Finish");
      return myReturnMessage;


// The class used to obtain Metadata.
[PermissionSet(SecurityAction.Demand, Name="FullTrust")]
public class MyMarshalByRefClass : MarshalByRefObject
   public int MyMethod(string str, double dbl, int i)
      Console.WriteLine("MyMarshalByRefClass.MyMethod {0} {1} {2}", str, dbl, i);
      return 0;

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.