This documentation is archived and is not being maintained.

LogicalMethodInfo.Parameters Property

Gets the parameters for the method.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in

public ParameterInfo[] Parameters { get; }
/** @property */
public ParameterInfo[] get_Parameters ()

public function get Parameters () : ParameterInfo[]

Not applicable.

Property Value

An array of ParameterInfo representing the parameters for the method.

Use a ParameterInfo to obtain information about the parameter's data type, default value, and so on.

Parameters returns an array of ParameterInfo objects representing the parameters passed into a method, in order.

using System;
using System.Reflection;
using System.Security.Permissions;
using System.Web.Services.Protocols;

public class MyService 
   public int Add(int xValue, int yValue)
      return (xValue + yValue);

class LogicalMethodInfo_Constructor
   [PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
   static void Run()
      Type myType = typeof(MyService);
      MethodInfo myMethodInfo = myType.GetMethod("Add");
      LogicalMethodInfo myLogicalMethodInfo = 
                  new LogicalMethodInfo(myMethodInfo);

      Console.WriteLine("\nPrinting properties of method : {0}\n",

      Console.WriteLine("\nThe declaring type of the method {0} is :\n",
      Console.WriteLine("\t" + myLogicalMethodInfo.DeclaringType);

      Console.WriteLine("\nThe parameters of the method {0} are :\n",
      ParameterInfo[] myParameters = myLogicalMethodInfo.Parameters;
      for(int i = 0; i < myParameters.Length; i++)
         Console.WriteLine("\t" + myParameters[i].Name +
                                 " : " + myParameters[i].ParameterType);

      Console.WriteLine("\nThe return type of the method {0} is :\n",
      Console.WriteLine("\t" + myLogicalMethodInfo.ReturnType);

      MyService service = new MyService();
      Console.WriteLine("\nInvoking the method {0}\n",
      Console.WriteLine("\tThe sum of 10 and 10 is : {0}",
                                                   new object[] {10, 10}));

   static void Main()

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0