后台-插件-广告管理-内容页广告位一(手机)

您现在的位置是:首页 > 开发类 > 问答问答

帮忙看下下面的代码是用什么还装NODE类的。

2021-07-06 20:03:04问答人已围观

简介 <TABLE style="MARGIN-BOTTOM: 0px" cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-

<TABLE style="MARGIN-BOTTOM: 0px" cellSpacing=0 cellPadding=0 width="100%"> <TBODY> <TR> <TD style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px" vAlign=top colSpan=2><PRE><FONT color=#1000a0>public</FONT> <FONT color=#1000a0>class</FONT> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection"><FONT color=#0000ff>TreeNodeCollection</FONT></A></B> : <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>, <A title=System.Collections.ICollection href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.ICollection"><FONT color=#0000ff>ICollection</FONT></A>, <A title=System.Collections.IEnumerable href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IEnumerable"><FONT color=#0000ff>IEnumerable</FONT></A> { <FONT color=#808080>// Methods</FONT> <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/Add(String):System.Windows.Forms.TreeNode"><FONT color=#0000ff>Add</FONT></A></B>(<A title=System.String href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.String"><FONT color=#0000ff>string</FONT></A> text); <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/Add(System.Windows.Forms.TreeNode):Int32"><FONT color=#0000ff>Add</FONT></A></B>(<A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> tn); <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/AddRange(System.Windows.Forms.TreeNode%5b%5d)"><FONT color=#0000ff>AddRange</FONT></A></B>(<A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A>[] treeNodes); <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/Clear()"><FONT color=#0000ff>Clear</FONT></A></B>(); <FONT color=#1000a0>public</FONT> <A title=System.Boolean href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Boolean"><FONT color=#0000ff>bool</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/Contains(System.Windows.Forms.TreeNode):Boolean"><FONT color=#0000ff>Contains</FONT></A></B>(<A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> tn); <FONT color=#1000a0>public</FONT> <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/CopyTo(System.Array,Int32)"><FONT color=#0000ff>CopyTo</FONT></A></B>(<A title=System.Array href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Array"><FONT color=#0000ff>Array</FONT></A> rgDest, <A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> index); <FONT color=#1000a0>public</FONT> <A title=System.Collections.IEnumerator href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IEnumerator"><FONT color=#0000ff>IEnumerator</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/GetEnumerator():System.Collections.IEnumerator"><FONT color=#0000ff>GetEnumerator</FONT></A></B>(); <FONT color=#1000a0>public</FONT> <A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/IndexOf(System.Windows.Forms.TreeNode):Int32"><FONT color=#0000ff>IndexOf</FONT></A></B>(<A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> tn); <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/Insert(Int32,System.Windows.Forms.TreeNode)"><FONT color=#0000ff>Insert</FONT></A></B>(<A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> index, <A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> tnNew); <FONT color=#1000a0>public</FONT> <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/Remove(System.Windows.Forms.TreeNode)"><FONT color=#0000ff>Remove</FONT></A></B>(<A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> tn); <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/RemoveAt(Int32)"><FONT color=#0000ff>RemoveAt</FONT></A></B>(<A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> index); <A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/System.Collections.IList.Add(Object):Int32"><FONT color=#0000ff>Add</FONT></A></B>(<A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> objNode); <A title=System.Boolean href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Boolean"><FONT color=#0000ff>bool</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/System.Collections.IList.Contains(Object):Boolean"><FONT color=#0000ff>Contains</FONT></A></B>(<A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> objNode); <A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/System.Collections.IList.IndexOf(Object):Int32"><FONT color=#0000ff>IndexOf</FONT></A></B>(<A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> objNode); <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/System.Collections.IList.Insert(Int32,Object)"><FONT color=#0000ff>Insert</FONT></A></B>(<A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> index, <A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> objNode); <A title=System.Void href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Void"><FONT color=#0000ff>void</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/System.Collections.IList.Remove(Object)"><FONT color=#0000ff>Remove</FONT></A></B>(<A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> objNode); <FONT color=#808080>// Properties</FONT> <FONT color=#1000a0>public</FONT> <A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:Count:Int32"><FONT color=#0000ff>Count</FONT></A></B> { <FONT color=#1000a0>get</FONT>; } <FONT color=#1000a0>public</FONT> <A title=System.Boolean href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Boolean"><FONT color=#0000ff>bool</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:IsReadOnly:Boolean"><FONT color=#0000ff>IsReadOnly</FONT></A></B> { <FONT color=#1000a0>get</FONT>; } <FONT color=#1000a0>public</FONT> <FONT color=#1000a0>virtual</FONT> <A title=System.Windows.Forms.TreeNode href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNode"><FONT color=#0000ff>TreeNode</FONT></A> <B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:Item(Int32):System.Windows.Forms.TreeNode"><FONT color=#0000ff>this</FONT></A></B>[<A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> index] { <FONT color=#1000a0>get</FONT>; <FONT color=#1000a0>set</FONT>; } <A title=System.Boolean href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Boolean"><FONT color=#0000ff>bool</FONT></A> <A title=System.Collections.ICollection href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.ICollection"><FONT color=#0000ff>ICollection</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:System.Collections.ICollection.IsSynchronized:Boolean"><FONT color=#0000ff>IsSynchronized</FONT></A></B> { <FONT color=#1000a0>get</FONT>; } <A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> <A title=System.Collections.ICollection href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.ICollection"><FONT color=#0000ff>ICollection</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:System.Collections.ICollection.SyncRoot:Object"><FONT color=#0000ff>SyncRoot</FONT></A></B> { <FONT color=#1000a0>get</FONT>; } <A title=System.Boolean href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Boolean"><FONT color=#0000ff>bool</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:System.Collections.IList.IsFixedSize:Boolean"><FONT color=#0000ff>IsFixedSize</FONT></A></B> { <FONT color=#1000a0>get</FONT>; } <A title=System.Object href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Object"><FONT color=#0000ff>object</FONT></A> <A title=System.Collections.IList href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Collections.IList"><FONT color=#0000ff>IList</FONT></A>.<B><A class=bold href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Windows.Forms:2.0.0.0:969db8053d3322ac/System.Windows.Forms.TreeNodeCollection/property:System.Collections.IList.Item(Int32):Object"><FONT color=#0000ff>this</FONT></A></B>[<A title=System.Int32 href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:969db8053d3322ac/System.Int32"><FONT color=#0000ff>int</FONT></A> index] { <FONT color=#1000a0>get</FONT>; <FONT color=#1000a0>set</FONT>; } } </PRE></TD></TR></TBODY></TABLE> <P>这个集合类是用什么来盛放NODE类的?</P> <P>是ARRARY还是ILIST。哪位能把ILIST接口讲的明白些。</P>

最佳答案:node 是TreeNode 的一个节点 public virtual 方法的关键字是virtual 说明这个方法不是继承来的 说明这个是类应该是一个父类 给下面的子类提供了 public virtual TreeNode Add(string text); 这样一个方法 换句话说 TreeNode 是为止支持这个类产生的 TreeNodeCollection 在看看这个类名字就是 TreeNodeCollection TreeNode的集合 所以说这个类里面肯定还有个属性或者字段 是list<TreeNode> 集成ILIST 估计就是想用集合而已 并没有继承其他的东西 ps:因为这个类表示的是集合关系TreeNodeCollection Collection 集合 所以实现ILIST应该表示的是结构上的关系 应该没有其他意义

文章来源:https://q.cnblogs.com/q/2464/

Tags:.net技术 c 

很赞哦! ()

后台-插件-广告管理-内容页广告位二(手机)

相关文章

后台-插件-广告管理-内容页广告位三(手机)
后台-插件-广告管理-内容页广告位四(手机)

文章评论

留言与评论(共有 0 条评论)
   
验证码:

本栏推荐

站点信息

  • 文章统计90038篇文章
  • 浏览统计10083次浏览
  • 评论统计1个评论
  • 标签管理标签云
  • 统计数据:统计代码
  • 微信公众号:扫描二维码,关注我们