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. How to determine best possible combination to a C# ListArray?

How to determine best possible combination to a C# ListArray?

Scheduled Pinned Locked Moved C#
csharpdata-structurestutorialquestion
4 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.
  • H Offline
    H Offline
    humblepgmr
    wrote on last edited by
    #1

    Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble

    H G L 3 Replies Last reply
    0
    • H humblepgmr

      Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble

      H Offline
      H Offline
      humblepgmr
      wrote on last edited by
      #2

      Just looking for the logic, and not the code.

      1 Reply Last reply
      0
      • H humblepgmr

        Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble

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

        humblepgmr wrote:

        So if I've got an array list of MyObjects_;

        What's the deal with the underscore?

        humblepgmr wrote:

        There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1);

        What do you mean by "type" in this case?

        humblepgmr wrote:

        What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)?

        Could you specify in what way any combination would be more accurate than any other?

        --- single minded; short sighted; long gone;

        1 Reply Last reply
        0
        • H humblepgmr

          Hi all, Library is coded in C#. Here are the conditions: So if I've got an array list of MyObjects_; Each MyObject_ contains a value There are only 4 types of MyObjects_ (Ie. obj1 = 6, obj2 = 4, obj3 = 3, obj2 = 2, obj1 = 1); I have an input value of (MyObjects_)input_ = 21; The array list size is unsorted and is an undetermined size until runtime. What's the logic to determine the most accurate combination of objects to result in the combination of (obj[i] == input_)? Thanks in advance Humble

          L Offline
          L Offline
          lmoelleb
          wrote on last edited by
          #4
          1. How does an input value of 21 fit into a context of an array list containing 4 different types, none of which are 21? 2) What is an "accurate combination of objects"? 3) What is now i in the "obj[i] == input_" part? And index I guess... but of what? 4) What is that trailing underscore doing everywhere (not relevant for your question as such I guess, just wondering).
          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