Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone Use Composite Objects?

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
CA
Hey guys,

We're trying to encorporate composite objects into our application to group object code off of the code behind for the aspx pages.

What we want to be able to do though is something like this:

objCar creates three objects within itself: objEngine, objHorn, and objRadio

objHorn has a method called Honk.

We want, from the web page, to be able to say
objCar.objHorn.Honk, but without any psudo-wrapper functions withint objCar to do so.

Kinda like how you can go DataSet.Tables().Rows().Items, even though the rows and items are actually part of the Table, not the Dataset.

Any thoughts on this? I've heard that classes need to be declared as Friend, and a few other leads, but there's not alot of documentation from Microsoft.

Thanks gang,

jack
 
ha ha ha, boy am I silly.

I figured it out, and it was super easy.

Basically, you just declare objects in your class declarations, and thats it.

Easy stuff.

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top