TreeNodeStyleCollection.Contains(TreeNodeStyle) 方法
定义
确定指定的 TreeNodeStyle 对象是否在集合中。Determines whether the specified TreeNodeStyle object is in the collection.
public:
bool Contains(System::Web::UI::WebControls::TreeNodeStyle ^ style);
public bool Contains (System.Web.UI.WebControls.TreeNodeStyle style);
member this.Contains : System.Web.UI.WebControls.TreeNodeStyle -> bool
Public Function Contains (style As TreeNodeStyle) As Boolean
参数
- style
- TreeNodeStyle
要查找的 TreeNodeStyle。The TreeNodeStyle to find.
返回
如果指定的 TreeNodeStyle 对象包含在集合中,则为 true;否则为 false。true, if the specified TreeNodeStyle object is contained in the collection; otherwise, false.
注解
使用 Contains 方法可确定对象中是否 TreeNodeStyle 包含对象 TreeNodeStyleCollection 。Use the Contains method to determine whether a TreeNodeStyle object is contained in the TreeNodeStyleCollection object. Contains方法通常用于在 TreeNodeStyle 执行任务之前测试对象是否存在,例如,在集合中添加或删除节点。The Contains method is commonly used to test for the existence of a TreeNodeStyle object before performing a task, such as adding or removing the node from the collection.