Suddenly, I want to write a collection like Treeview. nodes, because its add method is different from the general arraylist method.
First, find msdn and check that he (treenode) implements three interfaces:
Public ClassTreenodecollection:
,
,
Even so ., I almost fainted a bunch of methods, and it was not like ms to do so much work. After thinking for a while, the answer on msdn is hard to find. go to Google and scan the link:
Http://blog.joycode.com/kaneboy/archive/2003/10/25/3885.aspx
I read it twice and I know collectionbase ......
Last
Public Class Contactcollection: collectionbase
{
Public Int Add (contact)
{
ReturnList. Add (contact );
}
}
Ms is considerate.
It is estimated that everyone knows this secret. Let's take a look at it as a joke.
Alas, in addition, I used to see other people's blogsCodeIt can also be folded. It's quite cool. I don't know how to do it all the time. Today I only know that I have inserted code. It seems that I am just a bit confused. It's better to comfort myself.