Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > How to make a protected property in the base component public in the derived component?

Reply
Thread Tools

How to make a protected property in the base component public in the derived component?

 
 
Ingvar Nilsen
Guest
Posts: n/a
 
      12-16-2004
I have a base component, from which several components derive.
What I want is to just publish some of the protected properties in the
base component.

public class BaseClass
{
private int FA;
protected int A
{
get {return FA;}
set {FA = value;}
}
}

public class DerivedClass: BaseClass
{
Here I just want to publish the protected property A
}

Can this be done with just a directive?
Or do I need:

new public int A
{
get {return base.A;}
set {base.A = value;}
}

To do this?
I come from another environment, Borland Delphi, where this can be done
in a very simple way, I find the above approach rather cumbersome when
publishing many properties.

--
Ingvar Nilsen
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 01:44 PM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 12:07 AM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola Microsoft Certification 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd realexxams@yahoo.com Microsoft Certification 0 05-10-2006 02:35 PM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM



Advertisments