CodeThisReferenceExpressionとは? わかりやすく解説

CodeThisReferenceExpression クラス

現在のローカル クラスインスタンスへの参照表します

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

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

これを使用して、"this" または "me" から参照されるクラス オブジェクトを表すことができます

使用例使用例

CodeThisReferenceExpression使用して現在のオブジェクト参照する方法については、次のコード例参照してください

' Invokes the TestMethod method of the current type object.
Dim methodRef1 As New CodeMethodReferenceExpression(New
 CodeThisReferenceExpression(), "TestMethod")
Dim invoke1 As New CodeMethodInvokeExpression(methodRef1,
 New CodeParameterDeclarationExpression() {})

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

'       Me.TestMethod

// Invokes the TestMethod method of the current type object.
CodeMethodReferenceExpression methodRef1 = new CodeMethodReferenceExpression(
 new CodeThisReferenceExpression(), "TestMethod" );
CodeMethodInvokeExpression invoke1 = new CodeMethodInvokeExpression(
 methodRef1, new CodeParameterDeclarationExpression[] {} ); 
                                   

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

//        this.TestMethod();

// Invokes the TestMethod method of the current type object.
CodeMethodReferenceExpression^ methodRef1 = gcnew CodeMethodReferenceExpression(
 gcnew CodeThisReferenceExpression,"TestMethod" );
array<CodeParameterDeclarationExpression^>^temp1;
CodeMethodInvokeExpression^ invoke1 = gcnew CodeMethodInvokeExpression( methodRef1,temp1
 );

// A C# code generator produces the following source code for the preceeding
 example code:
//        this.TestMethod();
// Invokes the TestMethod method of the current type object.
CodeMethodReferenceExpression methodRef1 = new 
    CodeMethodReferenceExpression(new CodeThisReferenceExpression()
,
    "TestMethod");
CodeMethodInvokeExpression invoke1 = new 
    CodeMethodInvokeExpression(methodRef1, new 
    CodeParameterDeclarationExpression[]{});
// A VJ# code generator produces the following source code for the 
// preceeding example code:
// this.TestMethod();
継承階層継承階層
System.Object
   System.CodeDom.CodeObject
     System.CodeDom.CodeExpression
      System.CodeDom.CodeThisReferenceExpression
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

CodeThisReferenceExpression コンストラクタ


CodeThisReferenceExpression プロパティ


CodeThisReferenceExpression メソッド


CodeThisReferenceExpression メンバ

現在のローカル クラスインスタンスへの参照表します

CodeThisReferenceExpression データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド CodeThisReferenceExpression CodeThisReferenceExpression クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

CodeThisReferenceExpression クラス
System.CodeDom 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からCodeThisReferenceExpressionを検索した結果を表示しています。
Weblioに収録されているすべての辞書からCodeThisReferenceExpressionを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からCodeThisReferenceExpression を検索

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

辞書ショートカット

すべての辞書の索引

「CodeThisReferenceExpression」の関連用語

CodeThisReferenceExpressionのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS