次の方法で共有


AddIn.Object プロパティ

指定した AddIn オブジェクトをサポートするオブジェクトを設定または取得します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
Property Object As Object
Object Object { get; set; }
property Object^ Object {
    Object^ get ();
    void set (Object^ value);
}
abstract Object : Object with get, set
function get Object () : Object 
function set Object (value : Object)

プロパティ値

型 : Object

  • 他のアドインをサポートする追加の OLE オートメーション オブジェクト。

public void AddinObjExample(AddIn addIn)
{ 
   try
   {
      // If the Add-in's namespace is AnAddin and the constructor
      // is Connect(an object for implementing an Addin),
      // someObject is an instance of AnAddin.Connect.
      Object someObject = addIn.Object;

      MessageBox.Show(someObject.GetType().ToString());
   }
   catch(Exception ex)
   { 
      MessageBox.Show(ex.Message);
   }
}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

AddIn インターフェイス

EnvDTE 名前空間

その他の技術情報

方法 : オートメーション オブジェクト モデルのコード例をコンパイルおよび実行する