CodeMethodInvokeExpression クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CodeMethodInvokeExpression クラスの意味・解説 

CodeMethodInvokeExpression クラス

メソッド呼び出す式を表します

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class CodeMethodInvokeExpression
    Inherits CodeExpression
Dim instance As CodeMethodInvokeExpression
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
public class CodeMethodInvokeExpression : CodeExpression
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
public ref class CodeMethodInvokeExpression
 : public CodeExpression
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
public class CodeMethodInvokeExpression extends
 CodeExpression
SerializableAttribute 
ComVisibleAttribute(true) 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
public class CodeMethodInvokeExpression extends
 CodeExpression
解説解説

CodeMethodInvokeExpression使用してメソッド呼び出す式を表すことができます

Method プロパティは、呼び出すメソッド指定します。Parameters プロパティは、メソッドに渡すパラメータ示します。CodeDirectionExpression を使用してパラメータフィールド方向指定します

使用例使用例

CodeMethodInvokeExpression使用してメソッド呼び出す例を次に示します

' This CodeMethodInvokeExpression calls Me.Dispose(true)

    ' The targetObject parameter indicates the object containing the
 method to invoke.
    ' The methodName parameter indicates the method to invoke.
    ' The parameters array contains the parameters for the method invoke.

    Dim methodInvoke As New
 CodeMethodInvokeExpression( _
       New CodeThisReferenceExpression(), _
       "Dispose", _
       New CodeExpression() {New CodePrimitiveExpression(True)})

    ' A Visual Basic code generator produces the following source code
 for the preceeding example code:

    ' Me.Dispose(true)
CodeMethodInvokeExpression methodInvoke = new CodeMethodInvokeExpression(
    // targetObject that contains the method to invoke.
    new CodeThisReferenceExpression(),
    // methodName indicates the method to invoke.
    "Dispose",
    // parameters array contains the parameters for the method.
    new CodeExpression[] { new CodePrimitiveExpression(true)
 } );

// A C# code generator produces the following source code for the preceeding
 example code:

// this.Dispose(true);
array<CodeExpression^>^temp0 = {gcnew CodePrimitiveExpression( true
 )};

// parameters array contains the parameters for the method.
CodeMethodInvokeExpression^ methodInvoke = gcnew CodeMethodInvokeExpression( gcnew
 CodeThisReferenceExpression,"Dispose",temp0 );

// A C# code generator produces the following source code for the preceeding
 example code:
// this.Dispose(true);
CodeMethodInvokeExpression methodInvoke = new CodeMethodInvokeExpression(
    // targetObject that contains the method to invoke.
    new CodeThisReferenceExpression(),
    // methodName indicates the method to invoke.
    "Dispose",
    // parameters array contains the parameters for the method.
    new CodeExpression[] { new CodePrimitiveExpression(
    System.Convert.ToString(true)) });
// A VJ# code generator produces the following source code for the 
// preceeding example code:
// this.Dispose(true);
継承階層継承階層
System.Object
   System.CodeDom.CodeObject
     System.CodeDom.CodeExpression
      System.CodeDom.CodeMethodInvokeExpression
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeMethodInvokeExpression メンバ
System.CodeDom 名前空間
CodeDirectionExpression クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「CodeMethodInvokeExpression クラス」の関連用語

CodeMethodInvokeExpression クラスのお隣キーワード
検索ランキング

   

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



CodeMethodInvokeExpression クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS