Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Within a Class...
Message
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01078713
Message ID:
01078757
Views:
13
Hi,

You should be able to refer to your 'outer' class by name. e.g to access a property of SQLDBWrapper from within an instance of ClassDataSet: SQLDBWRAPPER.someProperty etc..

HTH,
Viv


>I am attempting to create and SQL Database Wrapper Class that incorporates all the functionality we need in the application that I am developing. Inside my SQLDBWrapper class, I am creating a child class called DataSetCollection as well as ClassDataSet. (Reference the mapping below)
>
>
>          SQLDBWarpper (Custom Class)
>          |
>           ------ClassDataSet (Inherited Class: DataSet)
>          |
>           ------DataSetCollection (Inherited Class: CollectionBase)
>
>
>Inside the SQLDBWrapper I create an object called "DataSets" based on DataSetCollection. DataSetCollection has an internal collection of ClassDataSet's. Now, what I am having a problem with is that inside the ClassDataSet, I need to reference a property/variable/method of SQLDBWrapper. I can't find a Me.Parent type of connection between my classes. How can I reference the parent class from my child class?
>
>P.S. I thought about creating a property to each Child Class that housed a reference to it's parent class, but then I would have to pass that reference into the child on every "New" method call. That seems a little ridiculous since the child is already "attached" to the parent class.
>
>Help...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform