LogicalMethodInfo.InParameters プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > LogicalMethodInfo.InParameters プロパティの意味・解説 

LogicalMethodInfo.InParameters プロパティ

LogicalMethodInfo のインスタンスで表されるメソッドに渡されたパラメータを取得します。

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public ReadOnly Property
 InParameters As ParameterInfo()
Dim instance As LogicalMethodInfo
Dim value As ParameterInfo()

value = instance.InParameters
public ParameterInfo[] InParameters { get;
 }
public:
property array<ParameterInfo^>^ InParameters {
    array<ParameterInfo^>^ get ();
}
/** @property */
public ParameterInfo[] get_InParameters ()
public function get InParameters
 () : ParameterInfo[]

プロパティ値
LogicalMethodInfo のインスタンスで表されるメソッドに渡されたパラメータを格納している ParameterInfo 型の配列。

解説解説

パラメータのデータ型、既定値などに関する情報を取得するには、ParameterInfo のインスタンスを使用します。

InParameters は、メソッドに渡されたパラメータを順に表す ParameterInfo オブジェクトの配列を返します。

使用例使用例
Imports System
Imports System.Reflection
Imports System.Web.Services.Protocols
Imports Microsoft.VisualBasic

Public Class MyService
   
   Public Sub MyMethod(inParameter As
 Integer, ByRef outParameter As
 Integer)
      outParameter = inParameter
   End Sub 'MyMethod
End Class 'MyService

Public Class LogicalMethodInfo_Create
   
   Public Shared Sub Main()
      Dim myType As Type = GetType(MyService)
      Dim myMethodInfo As MethodInfo = myType.GetMethod("MyMethod")
      Dim myLogicalMethodInfo As LogicalMethodInfo
 = _
                             LogicalMethodInfo.Create(New MethodInfo()
 {myMethodInfo})(0)
      
      Console.WriteLine _
        (ControlChars.Newline + "Printing parameters for the method
 : {0}", myLogicalMethodInfo.Name)
      
      Console.WriteLine _
        (ControlChars.Newline + "The parameters of the method
 {0} are :" + _
                                           ControlChars.Newline, myLogicalMethodInfo.Name)
      Dim myParameters As ParameterInfo() =
 myLogicalMethodInfo.Parameters
      Dim i As Integer
      For i = 0 To myParameters.Length - 1
         Console.WriteLine _
         (ControlChars.Tab + myParameters(i).Name + " : "
 + myParameters(i).ParameterType.toString())
      Next i
      
      Console.WriteLine _
          (ControlChars.Newline + "The in parameters of the method
 {0} are :" + _
                                               ControlChars.Newline, myLogicalMethodInfo.Name)
      myParameters = myLogicalMethodInfo.InParameters

      For i = 0 To myParameters.Length - 1
         Console.WriteLine(ControlChars.Tab + myParameters(i).Name + "
 : " + _
                                                   myParameters(i).ParameterType.toString())
      Next i
      
      Console.WriteLine(ControlChars.Newline + "The out parameters
 of the method {0} are :" + _
                                                    ControlChars.Newline, myLogicalMethodInfo.Name)
      myParameters = myLogicalMethodInfo.OutParameters

      For i = 0 To myParameters.Length - 1
         Console.WriteLine(ControlChars.Tab + myParameters(i).Name + "
 : " + _
                                                     myParameters(i).ParameterType.toString())
      Next i
      
      If myLogicalMethodInfo.IsVoid Then
         Console.WriteLine(ControlChars.Newline + "The return
 type is void")
      Else
         Console.WriteLine _
             (ControlChars.Newline + "The return type is {0}",
 myLogicalMethodInfo.ReturnType)
      End If
   End Sub 'Main 
End Class 'LogicalMethodInfo_Create
using System;
using System.Reflection;
using System.Web.Services.Protocols;

public class MyService
{
   public void MyMethod(int
 inParameter, out int outParameter)
   {
      outParameter = inParameter;
   }
}

public class LogicalMethodInfo_Create
{
   public static void Main()
   {
      Type myType = typeof(MyService);
      MethodInfo myMethodInfo = myType.GetMethod("MyMethod");
      LogicalMethodInfo myLogicalMethodInfo = 
         (LogicalMethodInfo.Create(new MethodInfo[] {myMethodInfo}))[0];

      Console.WriteLine("\nPrinting parameters for the method
 : {0}",
                           myLogicalMethodInfo.Name);

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

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

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

      if(myLogicalMethodInfo.IsVoid)
         Console.WriteLine("\nThe return type is void");
      else
         Console.WriteLine("\nThe return type is {0}"
,
                                 myLogicalMethodInfo.ReturnType);

   }
}
#using <System.Web.Services.dll>

using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Reflection;
using namespace System::Web::Services::Protocols;

public ref class MyService
{
public:
   void MyMethod( int inParameter, [Out]interior_ptr<int>
 outParameter )
   {
       *outParameter = inParameter;
   }
};

int main()
{
   Type^ myType = MyService::typeid;
   MethodInfo^ myMethodInfo = myType->GetMethod( "MyMethod" );
   array<MethodInfo^>^temparray = {myMethodInfo};
   LogicalMethodInfo^ myLogicalMethodInfo = (LogicalMethodInfo::Create( temparray
 ))[ 0 ];
   Console::WriteLine( "\nPrinting parameters for the method
 : {0}", myLogicalMethodInfo->Name );
   Console::WriteLine( "\nThe parameters of the method {0} are :\n", myLogicalMethodInfo->Name
 );
   array<ParameterInfo^>^myParameters = myLogicalMethodInfo->Parameters;
   for ( int i = 0; i < myParameters->Length;
 i++ )
   {
      Console::WriteLine( String::Concat( "\t ", myParameters[ i ]->Name,
 " : ", myParameters[ i ]->ParameterType ) );

   }
   Console::WriteLine( "\nThe in parameters of the method
 {0} are :\n", myLogicalMethodInfo->Name );
   myParameters = myLogicalMethodInfo->InParameters;
   for ( int i = 0; i < myParameters->Length;
 i++ )
   {
      Console::WriteLine( String::Concat( "\t ", myParameters[ i ]->Name,
 " : ", myParameters[ i ]->ParameterType ) );

   }
   Console::WriteLine( "\nThe out parameters of the method {0} are :\n",
 myLogicalMethodInfo->Name );
   myParameters = myLogicalMethodInfo->OutParameters;
   for ( int i = 0; i < myParameters->Length;
 i++ )
   {
      Console::WriteLine( String::Concat( "\t ", myParameters[ i ]->Name,
 " : ", myParameters[ i ]->ParameterType ) );

   }
   if ( myLogicalMethodInfo->IsVoid )
      Console::WriteLine( "\nThe return type is void"
 );
   else
      Console::WriteLine( "\nThe return type is {0}",
 myLogicalMethodInfo->ReturnType );
}
import System.*;
import System.Reflection.*;
import System.Web.Services.Protocols.*;
public class MyService
{
    public void MyMethod(int
 inParameter, /** @ref */int outParameter)
    {
        outParameter = inParameter;
    } //MyMethod
} //MyService

public class LogicalMethodInfo_Create
{
    public static void main(String[]
 args)
    {
        Type myType = MyService.class.ToType();
        MethodInfo myMethodInfo = myType.GetMethod("MyMethod");
        LogicalMethodInfo myLogicalMethodInfo = (LogicalMethodInfo)
            LogicalMethodInfo.Create(new MethodInfo[] { myMethodInfo
 }).
            get_Item(0);

        Console.WriteLine("\nPrinting parameters for the method
 : {0}", 
            myLogicalMethodInfo.get_Name());
        Console.WriteLine("\nThe parameters of the method {0} are :\n",
 
            myLogicalMethodInfo.get_Name());
        ParameterInfo myParameters[] = myLogicalMethodInfo.get_Parameters();
        for (int i = 0; i < myParameters.length;
 i++) {
            Console.WriteLine("\t"  
                + ((ParameterInfo)myParameters.get_Item(i)).get_Name() + " :
 "  
                + ((ParameterInfo)myParameters.get_Item(i)).get_ParameterType());
        }

        Console.WriteLine("\nThe in parameters of the method
 {0} are :\n", 
            myLogicalMethodInfo.get_Name());
        myParameters = myLogicalMethodInfo.get_InParameters();
        for (int i = 0; i < myParameters.length;
 i++) {
            Console.WriteLine("\t" 
                + ((ParameterInfo)myParameters.get_Item(i)).get_Name() + " :
 " 
                + ((ParameterInfo)myParameters.get_Item(i)).
                get_ParameterType());
        }

        Console.WriteLine("\nThe out parameters of the method {0} are :\n"
, 
            myLogicalMethodInfo.get_Name());
        myParameters = myLogicalMethodInfo.get_OutParameters();
        for (int i = 0; i < myParameters.length;
 i++) {
            Console.WriteLine("\t"  
                + ((ParameterInfo)myParameters.get_Item(i)).get_Name() + " :
 " 
                + ((ParameterInfo)myParameters.get_Item(i)).
                get_ParameterType());
        }

        if (myLogicalMethodInfo.get_IsVoid()) {
            Console.WriteLine("\nThe return type is void");
        }
        else {
            Console.WriteLine("\nThe return type is {0}"
, 
                myLogicalMethodInfo.get_ReturnType());
        }
    } //main 
} //LogicalMethodInfo_Create
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LogicalMethodInfo クラス
LogicalMethodInfo メンバ
System.Web.Services.Protocols 名前空間
Parameters
OutParameters



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「LogicalMethodInfo.InParameters プロパティ」の関連用語

LogicalMethodInfo.InParameters プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



LogicalMethodInfo.InParameters プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS