Property.Collection プロパティ
更新 : 2007 年 11 月
このプロパティをサポートしている Property オブジェクトを含んでいる Collection を取得します。
名前空間 : EnvDTE
アセンブリ : EnvDTE (EnvDTE.dll 内)
構文
'宣言
ReadOnly Property Collection As Properties
'使用
Dim instance As [Property]
Dim value As Properties
value = instance.Collection
Properties Collection { get; }
property Properties^ Collection {
Properties^ get ();
}
function get Collection () : Properties
プロパティ値
Properties コレクション。
例
public void CodeExample(DTE2 dte)
{
try
{ // Open a solution before running this example
Properties props = dte.Solution.Properties;
Property prop;
string msg = "";
if (props.Count > 0)
{
prop = props.Item(1); // Get first property
msg += "\nThis Property is named: " + prop.Name;
msg += "\nThis Property is located in a collection within
the following solution: " +
((Solution)prop.Collection.Parent).FullName;
if (prop.Parent.Equals(prop.Collection))
msg += "\nThe parent and collection properties return
the same object.";
msg += "\nThe DTE property returns: " + prop.DTE.Name;
}
MessageBox.Show(msg, "Property Object");
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
アクセス許可
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。