Click here to Skip to main content
15,908,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: member hiding question Pin
likefood19-Oct-06 11:07
likefood19-Oct-06 11:07 
GeneralRe: member hiding question Pin
Christian Graus19-Oct-06 11:17
protectorChristian Graus19-Oct-06 11:17 
GeneralRe: member hiding question Pin
likefood19-Oct-06 11:19
likefood19-Oct-06 11:19 
GeneralRe: member hiding question Pin
likefood19-Oct-06 11:18
likefood19-Oct-06 11:18 
GeneralRe: member hiding question Pin
Christian Graus19-Oct-06 11:24
protectorChristian Graus19-Oct-06 11:24 
AnswerRe: member hiding question Pin
jjansen19-Oct-06 20:44
jjansen19-Oct-06 20:44 
GeneralRe: member hiding question Pin
likefood20-Oct-06 4:13
likefood20-Oct-06 4:13 
GeneralRe: member hiding question Pin
jjansen19-Oct-06 21:08
jjansen19-Oct-06 21:08 
I think the solution to your problem is this:

Hide the property of the base class, but make the access modifier the same as in the base class, i.e. public.

Next, add the modifier protected to the set-accessor (.NET 2.0 required). The get-accessor cannot be protected as well, but I don't think that's a problem, I fact I think it's good practice to keep the get-accessor accessable.

You'll get something like this:

public new int Value<br />
{<br />
   get { return (base.Maximum - (base.Value - this.Minimum)); }<br />
   protected set { base.Value = base.Maximum - (value - this.Minimum); }<br />
}


That should work.
GeneralRe: member hiding question Pin
likefood20-Oct-06 4:16
likefood20-Oct-06 4:16 
QuestionDownloading an image Pin
NumbNut19-Oct-06 10:07
NumbNut19-Oct-06 10:07 
AnswerRe: Downloading an image Pin
Guffa19-Oct-06 10:49
Guffa19-Oct-06 10:49 
QuestionWrite arraylists content to file Pin
Yustme19-Oct-06 10:06
Yustme19-Oct-06 10:06 
AnswerRe: Write arraylists content to file Pin
Christian Graus19-Oct-06 10:21
protectorChristian Graus19-Oct-06 10:21 
GeneralRe: Write arraylists content to file Pin
Yustme19-Oct-06 10:43
Yustme19-Oct-06 10:43 
QuestionCalling Custom keys from a Web Config File Pin
iamnew2C#19-Oct-06 9:04
iamnew2C#19-Oct-06 9:04 
QuestionDownloading .NET Pin
bolddoggz19-Oct-06 8:57
bolddoggz19-Oct-06 8:57 
AnswerRe: Downloading .NET Pin
Christian Graus19-Oct-06 9:47
protectorChristian Graus19-Oct-06 9:47 
QuestionTree View Search Pin
joshp121719-Oct-06 8:44
joshp121719-Oct-06 8:44 
AnswerRe: Tree View Search Pin
mav.northwind20-Oct-06 22:10
mav.northwind20-Oct-06 22:10 
QuestionDPI-setting problem Pin
Bekjong19-Oct-06 5:15
Bekjong19-Oct-06 5:15 
QuestionFree Hand Drawing in PowerPoint through C# Pin
jonolo19-Oct-06 5:04
jonolo19-Oct-06 5:04 
QuestionDynamically retrieving WMI Data - A little help please! Pin
junus19-Oct-06 4:46
junus19-Oct-06 4:46 
QuestionMake property from base class protected Pin
topcatalpha19-Oct-06 4:43
topcatalpha19-Oct-06 4:43 
AnswerRe: Make property from base class protected Pin
Dustin Metzgar19-Oct-06 4:52
Dustin Metzgar19-Oct-06 4:52 
GeneralRe: Make property from base class protected Pin
topcatalpha19-Oct-06 5:15
topcatalpha19-Oct-06 5:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.