悬赏园豆:30
[已解决问题]
解决于 2008-08-21 12:37
<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>
秋色
|
初学一级
|
园豆:
47
提问于:2008-08-20 13:25