1

I need to make a custom container class but I can't use any existing container classes and I can't use any external libraries. I'm planning on using generic types to make the container flexible and I'm using an indexer to allow array-like accessing of the objects held in the container. But otherwise, I have no idea of how to create a dynamically sizing container from scratch and I can't seem to find any kind of definition on what exactly counts as an "external library". If I use System.Collections.Generic or System.ComponentModel, do those count as external libraries? I would assume not but I can't seem to find any thread that can answer that question. If you don't think those would qualify as external libraries, which ones would be the most helpful and logical as a starting point for custom data storage?

RedXXVI
  • 21
  • 6
  • 1
    Is this for a hw assignment? Data structures? – M Y Jul 11 '17 at 01:43
  • you mentioned `size`, so what platform are you targeting? winforms? – Lei Yang Jul 11 '17 at 01:44
  • It is for homework but my professor is intentionally being unhelpful. As for targeted platform, I don't have any particular platform in mind. I just have to use C#. – RedXXVI Jul 11 '17 at 01:59
  • 1
    You can create your custom container like a linked list. An object contains the pointer to the next object. Then you can access the object in your container by traversing from the first object. – Kim Hoang Jul 11 '17 at 02:06
  • https://stackoverflow.com/questions/3823848/creating-a-very-simple-linked-list might help – M Y Jul 11 '17 at 02:32

0 Answers0