OutputGroup.Collection プロパティ
更新 : 2007 年 11 月
このプロパティをサポートしているオブジェクトまたはこのコード コンストラクタに含まれているオブジェクトを含むコレクションを取得します。
名前空間 : EnvDTE
アセンブリ : EnvDTE (EnvDTE.dll 内)
構文
'宣言
ReadOnly Property Collection As OutputGroups
'使用
Dim instance As OutputGroup
Dim value As OutputGroups
value = instance.Collection
OutputGroups Collection { get; }
property OutputGroups^ Collection {
OutputGroups^ get ();
}
function get Collection () : OutputGroups
プロパティ値
OutputGroup コレクション。
例
public void CodeExample(DTE2 dte)
{
try
{ // Open a project before running this example.
Project proj = dte.Solution.Projects.Item(1);
OutputGroups groups = proj.ConfigurationManager.ActiveConfiguration.OutputGroups;
int c = 1;
int x = 0;
// Find an outputgroup with at least one file.
foreach (OutputGroup grp in groups)
{
x++;
if (grp.FileCount > 0)
c = x;
}
OutputGroup group = groups.Item(c);
msg += "OutputGroup Description: " + group.Description;
msg += "\nNumber of Associated Files: " + group.FileCount.ToString();
msg += "\nAssociated File Names: ";
foreach (String str in (Array)group.FileNames)
{
msg += "\n" + str;
}
MessageBox.Show(msg);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
アクセス許可
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。