CodeIndexerExpression クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オブジェクトのインデクサー プロパティへの参照を表します。
public ref class CodeIndexerExpression : System::CodeDom::CodeExpression
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeIndexerExpression : System.CodeDom.CodeExpression
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeIndexerExpression = class
inherit CodeExpression
Public Class CodeIndexerExpression
Inherits CodeExpression
- 継承
- 属性
例
次の例では、 CodeIndexerExpression を使用して現在のオブジェクトの型インデクサーを参照する方法を示します。
System.CodeDom.CodeIndexerExpression indexerExpression = new CodeIndexerExpression( new CodeThisReferenceExpression(), new CodePrimitiveExpression(1) );
// A C# code generator produces the following source code for the preceeding example code:
// this[1];
Dim indexerExpression = New CodeIndexerExpression(New CodeThisReferenceExpression(), New CodePrimitiveExpression(1))
' A Visual Basic code generator produces the following source code for the preceeding example code:
' Me(1)
注釈
CodeIndexerExpression は、コード インデクサーまたは非配列インデクサーへの参照を表すために使用できます。 配列インデクサーへの参照を表すには、 CodeArrayIndexerExpression を使用します。
コンストラクター
| 名前 | 説明 |
|---|---|
| CodeIndexerExpression() |
CodeIndexerExpression クラスの新しいインスタンスを初期化します。 |
| CodeIndexerExpression(CodeExpression, CodeExpression[]) |
指定したターゲット オブジェクトとインデックスを使用して、 CodeIndexerExpression クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Indices |
インデクサー式のインデックスのコレクションを取得します。 |
| TargetObject |
インデックスを作成できるターゲット オブジェクトを取得または設定します。 |
| UserData |
現在のオブジェクトのユーザー定義可能なデータを取得します。 (継承元 CodeObject) |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |