> > Make your methods short, and give your classes clear separation of
> > concerns - that way it should be obvious what's available.
>
> I *think* I get this:
> 1. I order for one object to see another, you MUST pass a reference of
> Object1 to Object 2 during Instance creation?And at no other time.
No, you could set properties later if you wanted.
> Exactly like a function needs the parameters passed to it?Is this
> correct?
Well, you need to have some way of getting to the data, yes.
> 2. So now Object2 can see Object1, but we still have the fact that
> Object1 needs to see Object2. How?
> I think if I can get this, my biggest hurdles will be overcome.
Setting properties could be the easiest way here. Or you could try to
avoid needing the cyclic reference in the first place.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
AMP - 19 Mar 2008 15:41 GMT
> > > Make your methods short, and give your classes clear separation of
> > > concerns - that way it should be obvious what's available.
[quoted text clipped - 20 lines]
> Jon Skeet - <sk...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
> World class .NET training in the UK:http://iterativetraining.co.uk
"No, you could set properties later if you wanted. "
How, not how to write a property, but how to write a property for an
object it doesnt know about?
If you could point me to a simple example online,that has 2 Objects
created and aware at each other using properties, that I could run in
my IDE,I would truly appreciate it.Here is my E-mail:
mpeloso@princeton.edu
Thanks
Mike
Jon Skeet [C# MVP] - 19 Mar 2008 15:51 GMT
<snip>
> "No, you could set properties later if you wanted. "
> How, not how to write a property, but how to write a property for an
> object it doesnt know about?
What do you mean? Do you not know what type the reference will be? If
so, declare the property to be of type Object. However, that's not
going to be terribly useful to you later on. I'd expect you to know at
least *something* about the reference that will be stored in the
property - such as that it's a Control, or a Form.
> If you could point me to a simple example online,that has 2 Objects
> created and aware at each other using properties, that I could run in
> my IDE,I would truly appreciate it.Here is my E-mail:
Rather than use online examples and the like, I really think it would
be better to hit the books. Read a good C# book from the start - it's
likely to help a lot more than fixing one isolated problem of
understanding.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk