BuildDependency.Collection 屬性
傳回包含支援此屬性之 BuildDependency 物件的 BuildDependencies 集合。
命名空間: EnvDTE
組件: EnvDTE (在 EnvDTE.dll 中)
語法
'宣告
ReadOnly Property Collection As BuildDependencies
BuildDependencies Collection { get; }
property BuildDependencies^ Collection {
BuildDependencies^ get ();
}
abstract Collection : BuildDependencies
function get Collection () : BuildDependencies
屬性值
型別:EnvDTE.BuildDependencies
BuildDependencies 集合。
範例
public void Example(DTE2 dte, AddIn addin)
{
try
{
// Make sure there is at least one BuildDependency in your
// solution to run this code.
BuildDependencies bldDepends;
BuildDependency bldDependency = null;
bldDepends = dte.Solution.SolutionBuild.BuildDependencies;
if (bldDepends.Count > 0)
bldDependency = bldDepends.Item(bldDepends.Count);
//
if (bldDependency.Collection.Count > 0)
MessageBox.Show(bldDependency.DTE.Name);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。