Delegates: String or Integer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • HockeyFan

    #1

    Delegates: String or Integer

    This is a continuation of the question "best way to randomly access my class
    members".
    I've figured out that I could use a delegate to accomplish this, but am not
    sure how.
    Some of the properties are Integers, while others are String.
    Is there a way I can set up a Delegate so that I can do this?
    I was hoping them that I could somehow push the delegates onto the
    Hashtable. Would this work?

  • GhostInAK

    #2
    Re: Delegates: String or Integer

    Hello HockeyFan,

    It sounds like you haven't designed a well-thought-out system. Forgetting
    about ramdom property access and delegates.. what exactly are you trying
    to accomplish?

    -Boo
    [color=blue]
    > This is a continuation of the question "best way to randomly access my
    > class
    > members".
    > I've figured out that I could use a delegate to accomplish this, but
    > am not
    > sure how.
    > Some of the properties are Integers, while others are String.
    > Is there a way I can set up a Delegate so that I can do this?
    > I was hoping them that I could somehow push the delegates onto the
    > Hashtable. Would this work?[/color]


    Comment

    • HockeyFan

      #3
      Re: Delegates: String or Integer

      I inherited it, so I'm stuck with the design.
      As far as what I'm trying to accomplish, like I said, I'm given a dataset
      with x number of rows, each containing a ResponseID and other information.
      The responseIDs wont be in any order. When I get a response ID, I need to be
      able to match it with the correct Property in the class. To accomplish this
      for now, I have a gigantic select case statement matching ResponseIDs to the
      properties. It works.

      "GhostInAK" wrote:
      [color=blue]
      > Hello HockeyFan,
      >
      > It sounds like you haven't designed a well-thought-out system. Forgetting
      > about ramdom property access and delegates.. what exactly are you trying
      > to accomplish?
      >
      > -Boo
      >[color=green]
      > > This is a continuation of the question "best way to randomly access my
      > > class
      > > members".
      > > I've figured out that I could use a delegate to accomplish this, but
      > > am not
      > > sure how.
      > > Some of the properties are Integers, while others are String.
      > > Is there a way I can set up a Delegate so that I can do this?
      > > I was hoping them that I could somehow push the delegates onto the
      > > Hashtable. Would this work?[/color]
      >
      >
      >[/color]

      Comment

      Working...