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. IEnumerable<string> in VS 2003

IEnumerable<string> in VS 2003

Scheduled Pinned Locked Moved C#
visual-studioperformancetutoriallearning
3 Posts 2 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.
  • W Offline
    W Offline
    wrykyn
    wrote on last edited by
    #1

    I'm trying to run an example that I found in a book that is for VS 2005. They use "using System.Collections.Generic" (which is not there in VS 2003) and also they use IEnumerable to provide foreach support to a class like this: public class ClassName : IEnumerable and then public IEnumerator GetEnumerator() { foeach(){ } } I'm not able to tack on the to either IEnumerable or IEnumerator in VS 2003 (to show that I'm returning a string from the foreach function) and I'm wondering if I'm missing including something or if this just cannot be done in 2003. Thanks "One of the Georges," said Psmith, "I forget which, once said that a certain number of hours' sleep a day--I cannot recall for the moment how many--made a man something, which for the time being has slipped my memory."

    S 1 Reply Last reply
    0
    • W wrykyn

      I'm trying to run an example that I found in a book that is for VS 2005. They use "using System.Collections.Generic" (which is not there in VS 2003) and also they use IEnumerable to provide foreach support to a class like this: public class ClassName : IEnumerable and then public IEnumerator GetEnumerator() { foeach(){ } } I'm not able to tack on the to either IEnumerable or IEnumerator in VS 2003 (to show that I'm returning a string from the foreach function) and I'm wondering if I'm missing including something or if this just cannot be done in 2003. Thanks "One of the Georges," said Psmith, "I forget which, once said that a certain number of hours' sleep a day--I cannot recall for the moment how many--made a man something, which for the time being has slipped my memory."

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Generics are not available in .NET 1.1, so yes, you can't do it from within VS .NET 2003. You can try one of the express editions that are available for free, over here(http://lab.msdn.microsoft.com/express/vcsharp/default.aspx[^]). Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      W 1 Reply Last reply
      0
      • S S Senthil Kumar

        Generics are not available in .NET 1.1, so yes, you can't do it from within VS .NET 2003. You can try one of the express editions that are available for free, over here(http://lab.msdn.microsoft.com/express/vcsharp/default.aspx[^]). Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        W Offline
        W Offline
        wrykyn
        wrote on last edited by
        #3

        Thank you :) "One of the Georges," said Psmith, "I forget which, once said that a certain number of hours' sleep a day--I cannot recall for the moment how many--made a man something, which for the time being has slipped my memory."

        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