摘要: 下面的代码示例演示如何使用 ParentNodeStyle 属性控制 TreeView 控件中父节点的外观。view plaincopy to clipboardprint? TreeView ParentNodeStyle Example ... 阅读全文
posted @ 2007-08-11 14:12 过河卒A 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: TreeView.DrawMode 属性的C#例子下面的代码示例演示如何使用所有者描述来自定义 TreeView 控件。此示例中的 TreeView 控件在标准节点标签旁边显示可选的节点标记。使用 TreeNode.Tag 属性指定节点标记。TreeView 控件也使用自定义颜色,包括自定义突出显示颜色。view plaincopy to clipboardprint?public TreeVie... 阅读全文
posted @ 2007-08-11 14:10 过河卒A 阅读(979) 评论(0) 推荐(0) 编辑
摘要: 下面的代码示例演示如何实现自定义集合的 IEnumerable 接口。在此示例中,没有显式调用但实现了 GetEnumerator,以便支持使用 foreach(在 Visual Basic 中为 for each)。此代码示例摘自 IEnumerable 接口的一个更大的示例。view plaincopy to clipboardprint?public class People : IEnum... 阅读全文
posted @ 2007-08-11 14:06 过河卒A 阅读(8139) 评论(3) 推荐(0) 编辑
摘要: 下面的代码示例演示如何使用 GetEnumerator 方法来创建 System.Collections.IEnumerator 接口,该接口可被循环访问以显示 DataGridColumnCollection 集合的内容。view plaincopy to clipboardprint? DataGridCo... 阅读全文
posted @ 2007-08-11 14:05 过河卒A 阅读(975) 评论(0) 推荐(0) 编辑
摘要: 示例说明如何使用 GetEnumerator 方法创建一个实现了 System.Collections.IEnumerator 的对象。然后循环访问该对象以显示选定行中的项。view plaincopy to clipboardprint? TableCellCollection Example ... 阅读全文
posted @ 2007-08-11 14:04 过河卒A 阅读(1192) 评论(0) 推荐(0) 编辑
摘要: 下面的代码示例使用 GetEnumerator 方法显示输入字符串中的每个 System.Char。view plaincopy to clipboardprint?// Example for the String.GetEnumerator( ) method. using System; using System.Collections; class GetEnumerato... 阅读全文
posted @ 2007-08-11 14:02 过河卒A 阅读(1985) 评论(0) 推荐(0) 编辑
摘要: 下面的示例演示如何使用 GetEnumerator 方法检索一个枚举数,该枚举数包含集合中的值。然后,循环访问该枚举数,并将第一个单元格的值显示在页上。view plaincopy to clipboardprint? GridViewRowCollection GetEnumerator Example ... 阅读全文
posted @ 2007-08-11 13:59 过河卒A 阅读(768) 评论(1) 推荐(0) 编辑
摘要: 下面的代码示例阐释了如何使用 GetEnumerator 方法。view plaincopy to clipboardprint?// Get 'Validators' of the page to myCollection. ValidatorCollection myCollection = Page.Validators; // Get the Enumerator. IEn... 阅读全文
posted @ 2007-08-11 13:57 过河卒A 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 下面的示例展示如何使用 GetEnumerator 方法创建一个实现了 System.Collections.IEnumerator 的对象,该对象被循环访问以显示表中的项。view plaincopy to clipboardprint? TableCellCollection Example ... 阅读全文
posted @ 2007-08-11 13:56 过河卒A 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: 下面的代码示例演示如何使用 GetEnumerator 方法创建 System.Collections.IEnumerator 对象。然后循环访问 System.Collections.IEnumerator 对象以显示 HtmlTableRowCollection 集合的内容。view plaincopy to clipboardprint? ... 阅读全文
posted @ 2007-08-11 13:54 过河卒A 阅读(617) 评论(0) 推荐(0) 编辑
摘要: 下面的示例说明 GetEnumerator 方法的用法。包括在枚举数为活动的情况下从基础 DataTable 中删除行时枚举数的行为。view plaincopy to clipboardprint?public static void Main() { try { DataTable userTable = new DataTable("people... 阅读全文
posted @ 2007-08-11 13:43 过河卒A 阅读(3167) 评论(0) 推荐(0) 编辑
摘要: --> 下面的代码示例演示如何使用此构造函数将节点动态添加到 TreeView 控件。 1 2 3 49 50 51 52 53 54 TreeNode Constructor Example 55 56 57 58 59 60 61 ... 阅读全文
posted @ 2007-08-11 13:41 过河卒A 阅读(1824) 评论(0) 推荐(0) 编辑