FontsAndColorsItems.Count 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示集合中的对象数 FontsAndColorsItems 。
public:
property int Count { int get(); };
public:
property int Count { int get(); };
[System.Runtime.InteropServices.DispId(1)]
public int Count { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.Count : int
Public ReadOnly Property Count As Integer
属性值
一个整数值,指示集合中的对象数 FontsAndColorsItems 。
- 属性
示例
public void CodeExample(DTE2 dte)
{ // Make sure you have an open solution
try
{
Properties props;
Property prop;
FontsAndColorsItems fci;
ColorableItems ci;
string msg = "";
props = dte.get_Properties("FontsAndColors", "TextEditor");
prop = props.Item("FontsAndColorsItems");
fci = (FontsAndColorsItems)prop.Object;
ci = fci.Item(1);
msg += "Count of ColorableItems in fci: " + fci.Count + "\n";
msg += "The first ColorableItems object in fci is " + ci.Name;
MessageBox.Show(msg);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}