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. Showing the corresponding data from other text file after being sorted and searched other text file

Showing the corresponding data from other text file after being sorted and searched other text file

Scheduled Pinned Locked Moved C#
algorithmstutorialquestion
4 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.
  • G Offline
    G Offline
    gamer1127
    wrote on last edited by
    #1

    Hello. How will I show the other data that came from the other text file after I sort and search a different text file? For example, I searched for the name which is saved from another text file, how will i show the corresponding data which are saved from different text files for the name i searched? For example, for searching:

    Search: Lopez

    Last Name First Name Age Gender
    Lopez John 18 Male

    for sorting: before:

    Sorting by Last Name:
    Lopez John
    Belasco Kelly
    Santiago Kristine
    Feroia Peter

    after:

    Belasco Kelly
    Feroia Peter
    Lopez John
    Santiago Kristine

    How will i be able to do that?

    L 1 Reply Last reply
    0
    • G gamer1127

      Hello. How will I show the other data that came from the other text file after I sort and search a different text file? For example, I searched for the name which is saved from another text file, how will i show the corresponding data which are saved from different text files for the name i searched? For example, for searching:

      Search: Lopez

      Last Name First Name Age Gender
      Lopez John 18 Male

      for sorting: before:

      Sorting by Last Name:
      Lopez John
      Belasco Kelly
      Santiago Kristine
      Feroia Peter

      after:

      Belasco Kelly
      Feroia Peter
      Lopez John
      Santiago Kristine

      How will i be able to do that?

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

      that is exactly why I said you could create a class MyType that holds all info, then sort the collection of MyType objects; doing so keeps the items intact. :)

      Luc Pattyn

      :badger: :jig: :badger:

      Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

      :jig: :badger: :jig:

      G 1 Reply Last reply
      0
      • L Luc Pattyn

        that is exactly why I said you could create a class MyType that holds all info, then sort the collection of MyType objects; doing so keeps the items intact. :)

        Luc Pattyn

        :badger: :jig: :badger:

        Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

        :jig: :badger: :jig:

        G Offline
        G Offline
        gamer1127
        wrote on last edited by
        #3

        I have 5 text files and inside every file there are 30 predefined data. Is it possible for me to add those data in the class MyType as one? Besides that I have a function that lets the user add more data, which is easier to add in the class MyType as one.

        L 1 Reply Last reply
        0
        • G gamer1127

          I have 5 text files and inside every file there are 30 predefined data. Is it possible for me to add those data in the class MyType as one? Besides that I have a function that lets the user add more data, which is easier to add in the class MyType as one.

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

          gamer1127 wrote:

          Is it possible for me to ...

          if you can explain it properly, then you can program it. :)

          Luc Pattyn

          :badger: :jig: :badger:

          Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.

          :jig: :badger: :jig:

          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