What is a custom collection?

Posted by Win Coder on Stack Overflow See other posts from Stack Overflow or by Win Coder
Published on 2012-12-16T16:58:09Z Indexed on 2012/12/16 17:03 UTC
Read the original article Hit count: 329

Filed under:
|
|
|

A Group of objects. However i am having confusion in the following case.

A sample class

Class A
{
     public string;
}

Class A_list
{
     public A[] list;
     public A_list(A[] _list)
     {
        list = new A[_list.length];
        for (int i = 0; i < _list.Length; i++)
        {
            list[i] = _list[i];
        }
    }
}

static void Main(String[] args)
{
    A[] names = new A[3]
        {
            new A("some"),
            new A("another"),
            new A("one"),
        };

    A_list just_an_object = new A_list(names);
 }

Which of the above is a custom collection the array or the object that holds array as a field or are both custom collections.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET