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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. List definition in C#

List definition in C#

Scheduled Pinned Locked Moved C#
csharp
5 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.
  • Z Offline
    Z Offline
    zaboboa
    wrote on last edited by
    #1

    How come I cant define the List type using the statement: List intList = new List(); it seems it does not recognize the List definition. Thank you.

    S S 2 Replies Last reply
    0
    • Z zaboboa

      How come I cant define the List type using the statement: List intList = new List(); it seems it does not recognize the List definition. Thank you.

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      Did you wrote a using directive for the correct namespace, so the use of types in that namespace is allowed without having to specify the namespace.?


      www.troschuetz.de

      Z 1 Reply Last reply
      0
      • S Stefan Troschuetz

        Did you wrote a using directive for the correct namespace, so the use of types in that namespace is allowed without having to specify the namespace.?


        www.troschuetz.de

        Z Offline
        Z Offline
        zaboboa
        wrote on last edited by
        #3

        The only directive that I think I need is System.Collections; And that is what I have. Do I need some other directives to use List Thank you

        S 1 Reply Last reply
        0
        • Z zaboboa

          The only directive that I think I need is System.Collections; And that is what I have. Do I need some other directives to use List Thank you

          S Offline
          S Offline
          Stefan Troschuetz
          wrote on last edited by
          #4

          The System.Collections namespace doesn't contain a List type. There are ArrayList or SortedList type and IList interface.


          www.troschuetz.de

          1 Reply Last reply
          0
          • Z zaboboa

            How come I cant define the List type using the statement: List intList = new List(); it seems it does not recognize the List definition. Thank you.

            S Offline
            S Offline
            Snowblind37
            wrote on last edited by
            #5

            There is no List definition in C#. I suggest you go to http://msdn.microsoft.com/ . There you will be able to find the definitions of all the classes available. They are mostly the same for C# and VB, etc. Actual class names will differ from Java but the functionality will be more or less the same. CodeBlind37

            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