CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    126

    Containers in C#

    We must be having containers in C#(equivalent of std::list<>, std::vector<> etc. containers in C++).

    What is this container class called(do we have different types of containers, like we have different types of containers in C++ - lists, vectors etc)?

    Thanks
    Vikram

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: Containers in C#

    ArrayList, Queue, Stack etc are probably what you're looking for. At least previous to version 2 of the .NET framework.

    Previous to Vr 2 there's no concept of a 'template' so all containers (have a look in System.Collections) use the base 'object' class and expect the author to recast as necessary.

    In Vr 2 of the .NET framework we now have generics which are the equivalent of templates in C++.

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured