[dba-VB] C# protected

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Thu Mar 24 16:37:22 CDT 2011


Hi John --

Then use 

protected

access modifier for methods and properties of Class A which is inherited by
class B (IOW no need to instantiate class A explicitly)...

Class C which will instantiate Class B will no see/have access to protected
properties and methods of class A inherithed by class B.

Thank you.

--
Shamil
 
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: 24 ????? 2011 ?. 23:28
To: Discussion concerning Visual Basic and related programming issues.
Subject: Re: [dba-VB] C# protected

ClassA can go in the class library, but classB is part of the application.

John W. Colby
www.ColbyConsulting.com

On 3/24/2011 4:14 PM, Shamil Salakhetdinov wrote:
> Hi John --
>
> Put ClassA and ClassB into a class library.
> Use
>
> internal
>
> access modifier with their methods and properties to be seen within 
> their class library but not from the "outer world".
>
> Thank you.
>
> --
> Shamil
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: 24 ????? 2011 ?. 21:07
> To: VBA
> Subject: [dba-VB] C# protected
>
> I am trying to create a method of a ClassA which can be seen from the 
> object ClassB that instantiates ClassA but not by objectClassC which 
> instantiates ClassB.
>
> IOW ClassA "belongs to" ClassB so specific methods / properties of 
> ClassB should be manipulateable by ClassB.  However those properties / 
> methods should not be visible to anything outside of ClassA and ClassB.
>
> Possible?
>
> Oh, and BTW I want ClassA to be out in a class library, external to 
> the project using it.
> --
> John W. Colby
> www.ColbyConsulting.com
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list