Projects.Properties プロパティ

更新 : 2007 年 11 月

Projects コレクションに属するすべてのプロパティのコレクションを取得します。

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

構文

'宣言
ReadOnly Property Properties As Properties
'使用
Dim instance As Projects
Dim value As Properties

value = instance.Properties
Properties Properties { get; }
property Properties^ Properties {
    Properties^ get ();
}
function get Properties () : Properties

プロパティ値

型 : EnvDTE.Properties

Properties コレクション。

解説

一部のプロパティは、Solution オブジェクトのオートメーション プロパティとして公開されます。また、ビルド依存関係にアクセスするための SolutionBuild オブジェクトなど、ソリューションを介して到達するオブジェクトから公開される場合もあります。

public void CodeExample(DTE2 dte)
{  
    try
    {   // Open a project before running this sample
        Projects prjs = dte.Solution.Projects;
        string msg = "There are " + prjs.Count.ToString() + " projects in this collection.";
        msg += "\nThe application containing this Projects collection: " + prjs.DTE.Name;
        msg += "\nThe parent object of the Projects collection: " + prjs.Parent.Name;
        msg += "\nThe GUID representing the Projects type: " + prjs.Kind;
        if (prjs.Properties != null)
        {
            msg += "\nProperties:";
            foreach (Property prop in prjs.Properties)
            {
                msg += "\n   " + prop.Name;
            }
        }
        MessageBox.Show(msg, "Projects Collection");
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

アクセス許可

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

参照

参照

Projects インターフェイス

Projects メンバ

EnvDTE 名前空間

その他の技術情報

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