473,503 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access parent class?

i have a class Workstations which inherits collectionbase.
basically Workstations is a collection of Workstation's

my workstations collection has a property called ValidatedCount

the workstation class has a method called Validate()

what i would like to do is use the Workstations class to have a count
(inherited from collectionbase) and have a ValidatedCount...

how do i access the parent class to increase the ValidatedCount property
from the Workstion object in the Workstations class?

Thanks
Justin
Sep 11 '07 #1
1 1979
On Sep 11, 2:24 pm, "Justin Rich" <jrich...@yahoo.spam.comwrote:
i have a class Workstations which inherits collectionbase.
basically Workstations is a collection of Workstation's

my workstations collection has a property called ValidatedCount

the workstation class has a method called Validate()

what i would like to do is use the Workstations class to have a count
(inherited from collectionbase) and have a ValidatedCount...

how do i access the parent class to increase the ValidatedCount property
from the Workstion object in the Workstations class?
There's no natural concept of a "parent" in this case - after all,
unless you've specifically precluded it, a Workstation could be part
of multiple Workstations collections.

Does it take long to validate a Workstation instance? If not, I'd just
make the ValidateCount iterate through all the Workstation instances
in the collection and call Validate on each of them.

Jon

Sep 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4786
by: RR | last post by:
I have two classes: class Base { function Insert() { // does stuff } }
2
9695
by: Heiko Henkelmann | last post by:
Please see the following example. Is there any other way to access SomeAttribute from the nested class, without having to use the actual name of the outer class? class SomeClass:...
49
14282
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
4
7330
by: p988 | last post by:
using System; using System.Windows.Forms; using System.Drawing; class MyForm : Form { MyForm () { Text = "Windows Forms Demo"; }
6
2423
by: Christian H | last post by:
Hi! I've created a custom control (myDrawControl) that deals with drawing. This control is then added to a form( myMainForm) Now, whenever something is dragged and dropped onto myDrawControl ,...
3
1828
by: Antuane | last post by:
hi guys, its me again, with a few simple (probably silly) quesetion... hi guys, i've managed to create a custom textbox class. & i'd like to access the parent control (in this case this would be...
4
1344
by: Danny Tuppeny | last post by:
Hi all, The next few paragraphs put my question in context, but feel free to skip down to the end if you don't care *why* I need the answer! :) **************************************** ***...
10
19562
by: Goran Djuranovic | last post by:
Hi all, Does anyone know how to declare a variable in a class to be accessible ONLY from a classes instantiated within that class? For example: ************* CODE ***************** Public...
3
2547
by: tom | last post by:
How to get access to veriable from static class member? class cTest { public: int a; void Set_a(){a = 1;} static int dlgTest()
3
1875
by: rick | last post by:
I have a situation where I want to write an extensible class that is capable of saving / restoring properties of classes derived from it. A simplified example is explained as follows;- class A...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.