Re: how to detect object reference between objects?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Thu, 11 Dec 2008 20:48:08 -0800, fairyvoice <fairyvoice@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I mean from the outside, where I can not get the A reference of b through
some method or property of B.

You'll have to use reflection.

And in general, if you find yourself wanting to do something that requires reflection, it's usually the wrong thing to do.

If you can be more specific about _why_ you feel you need to do this, then perhaps someone can suggest a better design that doesn't break encapsulation of classes.

Pete
.



Relevant Pages

  • Re: Programaticly call a method from a different object?
    ... In most cases, reflection is not necessary. ... A better design removes the ... I do not answer questions on behalf of my employer. ... programmer helping programmers. ...
    (microsoft.public.dotnet.general)
  • Re: Optical Sensor (different from the 2-d sensor)
    ... Wescott Design Serviceshttp://www.wescottdesign.com ... "Applied Control Theory for Embedded Systems" gives you just what it says. ... I would try first with an LED or laser + a PIN photodiode. ... You may have more of a challenge minimizing the coupling between the transmitter and receiver with no reflection than you do with anything else. ...
    (sci.electronics.design)
  • Re: Static vs Dynamic
    ... >> of design. ... casting is necessary in order to have polymorphism in Java. ... >> You can very easily using reflection without casts. ...
    (comp.lang.lisp)
  • Re: Method Design Help - delegates dont help
    ... We did try reflection but didnt gain much ... We did take a step back and looked at the overall design and realized ... that the resource aquisition and usage could drop to a lower layer as ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Q re improving development skills - Loose coupling etc
    ... Just wanting to pick people's brains here .... ... I'm finding with my development style that often my solutions are too ... If you need more - its a bad design. ...
    (microsoft.public.vb.general.discussion)