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. design pattern needed (for C#)

design pattern needed (for C#)

Scheduled Pinned Locked Moved C#
regexcsharpdesignarchitecturequestion
6 Posts 4 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.
  • N Offline
    N Offline
    NaNg15241
    wrote on last edited by
    #1

    I'm lookin for a design-pattern that match what I need: I have class A which should hold a collection of class B or its inehrited classes. class B should be able to run functions and access properties on A and A should be able to run functions and access properties on B. I've been suggested to pass reference of As properties to B opon construction, but I'm lookin for the design-pattern... anyone know of any design-pattern similar to this? Thanks alot :) NaNg.

    E D 2 Replies Last reply
    0
    • N NaNg15241

      I'm lookin for a design-pattern that match what I need: I have class A which should hold a collection of class B or its inehrited classes. class B should be able to run functions and access properties on A and A should be able to run functions and access properties on B. I've been suggested to pass reference of As properties to B opon construction, but I'm lookin for the design-pattern... anyone know of any design-pattern similar to this? Thanks alot :) NaNg.

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      It's called the Charlie Foxtrot design pattern.

      Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      N 1 Reply Last reply
      0
      • E Ennis Ray Lynch Jr

        It's called the Charlie Foxtrot design pattern.

        Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

        N Offline
        N Offline
        NaNg15241
        wrote on last edited by
        #3

        are you sure? (or are you just teasing me?) :x I can't find in google some info about it. Can you maybe give me a link for more info about it?

        L 1 Reply Last reply
        0
        • N NaNg15241

          are you sure? (or are you just teasing me?) :x I can't find in google some info about it. Can you maybe give me a link for more info about it?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The word gullible is written on your ceiling. Check it out.

          Check out the CodeProject forum Guidelines[^]

          N 1 Reply Last reply
          0
          • N NaNg15241

            I'm lookin for a design-pattern that match what I need: I have class A which should hold a collection of class B or its inehrited classes. class B should be able to run functions and access properties on A and A should be able to run functions and access properties on B. I've been suggested to pass reference of As properties to B opon construction, but I'm lookin for the design-pattern... anyone know of any design-pattern similar to this? Thanks alot :) NaNg.

            D Offline
            D Offline
            DaveyM69
            wrote on last edited by
            #5

            If they're that closely related they should implement a common interface that has the methods and properties that need to be shared in it.

            public class A : C
            {
            }

            public class B : C
            {
            }

            public interface C
            {
            // Common implementation here.
            }

            Dave
            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
            Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
            Why are you using VB6? Do you hate yourself? (Christian Graus)

            1 Reply Last reply
            0
            • L Lost User

              The word gullible is written on your ceiling. Check it out.

              Check out the CodeProject forum Guidelines[^]

              N Offline
              N Offline
              NaNg15241
              wrote on last edited by
              #6

              well excuse me for not having English as my native language and my day-to-day language ;-)

              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