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. Sort a collection

Sort a collection

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

    HI, I've a collection which contains a couple of object I've created. Is there a simple method to sort this collection or should I code a standard sort algorithm ?

    N 1 Reply Last reply
    0
    • S sybux2000

      HI, I've a collection which contains a couple of object I've created. Is there a simple method to sort this collection or should I code a standard sort algorithm ?

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      if the Collection you are using is the one priovided by the .Net Framework(i.e. arrays, Arraylist etc.) you can just use: Collection.Sort But if the collection you are using is inherited, then you'll have to do the coding yourself. Notorious SMC


      The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
      Get your facts first, and then you can distort them as much as you please Mark Twain

      S 1 Reply Last reply
      0
      • N Nick Seng

        if the Collection you are using is the one priovided by the .Net Framework(i.e. arrays, Arraylist etc.) you can just use: Collection.Sort But if the collection you are using is inherited, then you'll have to do the coding yourself. Notorious SMC


        The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
        Get your facts first, and then you can distort them as much as you please Mark Twain

        S Offline
        S Offline
        sybux2000
        wrote on last edited by
        #3

        I'm using standard collection object but the sort method doesn't exist on collection object.

        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