Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Create Collection from Class

Create Collection from Class

Scheduled Pinned Locked Moved C#
csharptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mail572352
    wrote on last edited by
    #1

    Hi, I have a C# class which has a number of properties. I want to create a collection for this class to pass to a method. Can anyone tell me how to do this? There must be a standard way I think.

    A L 2 Replies Last reply
    0
    • M mail572352

      Hi, I have a C# class which has a number of properties. I want to create a collection for this class to pass to a method. Can anyone tell me how to do this? There must be a standard way I think.

      A Offline
      A Offline
      Abisodun
      wrote on last edited by
      #2

      Take a look at Generics in .NET 2.0. List or Dictionary are probably what you need.

      1 Reply Last reply
      0
      • M mail572352

        Hi, I have a C# class which has a number of properties. I want to create a collection for this class to pass to a method. Can anyone tell me how to do this? There must be a standard way I think.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        What is the collection supposed to hold: multiple instances of that class ? the public properties ? or something completely different ? :)

        Luc Pattyn

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups