CodeMethodInvokeExpression クラス
アセンブリ: System (system.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ Public Class CodeMethodInvokeExpression Inherits CodeExpression
[SerializableAttribute] [ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] public class CodeMethodInvokeExpression : CodeExpression
[SerializableAttribute] [ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] public ref class CodeMethodInvokeExpression : public 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.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodeMethodInvokeExpression


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からCodeMethodInvokeExpression クラスを検索する場合は、下記のリンクをクリックしてください。

- CodeMethodInvokeExpression クラスのページへのリンク