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. Visual Basic
  4. for each

for each

Scheduled Pinned Locked Moved Visual Basic
help
7 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.
  • M Offline
    M Offline
    moonshaddow
    wrote on last edited by
    #1

    hey, this looks like a easy one but i'm stumped

    For Each dal As ArrayList In My.Settings
    dal.RemoveAt(Me.TabControl.SelectedIndex)
    Next

    basically what i am trying to do is for every arraylist remove a section of it, a error comes under my.settings saying that it is not a collection, can anyone help, thanks in advance

    J.Hardy

    C 1 Reply Last reply
    0
    • M moonshaddow

      hey, this looks like a easy one but i'm stumped

      For Each dal As ArrayList In My.Settings
      dal.RemoveAt(Me.TabControl.SelectedIndex)
      Next

      basically what i am trying to do is for every arraylist remove a section of it, a error comes under my.settings saying that it is not a collection, can anyone help, thanks in advance

      J.Hardy

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Your settings is a collection of arraylists ? Are you sure ?

      Christian Graus Driven to the arms of OSX by Vista.

      M 1 Reply Last reply
      0
      • C Christian Graus

        Your settings is a collection of arraylists ? Are you sure ?

        Christian Graus Driven to the arms of OSX by Vista.

        M Offline
        M Offline
        moonshaddow
        wrote on last edited by
        #3

        i has about 20 different arraylist in it, just trying to remove a section out of each 1

        J.Hardy

        C 1 Reply Last reply
        0
        • M moonshaddow

          i has about 20 different arraylist in it, just trying to remove a section out of each 1

          J.Hardy

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Perhaps My.Settings is not a collection you can for each over, you can only access the values by name ? Or does My.Settings have a property that IS a collection, which you could use ?

          Christian Graus Driven to the arms of OSX by Vista.

          M 1 Reply Last reply
          0
          • C Christian Graus

            Perhaps My.Settings is not a collection you can for each over, you can only access the values by name ? Or does My.Settings have a property that IS a collection, which you could use ?

            Christian Graus Driven to the arms of OSX by Vista.

            M Offline
            M Offline
            moonshaddow
            wrote on last edited by
            #5

            well i had a look and could not find anything, sorry to ask this but can you give me a little more of a hint?

            J.Hardy

            C 1 Reply Last reply
            0
            • M moonshaddow

              well i had a look and could not find anything, sorry to ask this but can you give me a little more of a hint?

              J.Hardy

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              I am on my Mac, I'd have to go and boot windows to have a dig around for you. I really don't know what My.Settings returns. The Property Grid can iterate over your settings, so there has to be a property. Just hit . after My.Settings and look through, there's got to be something, otherwise your other option ( as it appears to be a machine generated class from a config file ) is to use reflection.

              Christian Graus Driven to the arms of OSX by Vista.

              M 1 Reply Last reply
              0
              • C Christian Graus

                I am on my Mac, I'd have to go and boot windows to have a dig around for you. I really don't know what My.Settings returns. The Property Grid can iterate over your settings, so there has to be a property. Just hit . after My.Settings and look through, there's got to be something, otherwise your other option ( as it appears to be a machine generated class from a config file ) is to use reflection.

                Christian Graus Driven to the arms of OSX by Vista.

                M Offline
                M Offline
                moonshaddow
                wrote on last edited by
                #7

                ok, thanks

                If at first you don't succeed redefine success J.Hardy

                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