... Collectionbase.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.