[dba-VB] C# Scope

jwcolby jwcolby at colbyconsulting.com
Sat Nov 5 11:29:57 CDT 2011


Suppose I have a set of classes:

class runState
{
	mStart()
	{
	}
	
	mStarted()
	{
	}
}

class myClassParent
{
	runState myRunState;
	
}

class myGrandParent
{
	myClassParent MyClassParent;
}

Is there any way to scope runState.mStarted to be visible to MyClassParent but not visible to the 
grandparent while making runState.mStart visible to MyClassParent and MyClassGrandparent?

In other words the grandparent should be able to call the parent's runState.mStart but not be able 
to call the runState.mStarted.  Only the parent should be able to call runState.MStarted.


-- 
John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it



More information about the dba-VB mailing list