Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralLaunch the Internet Explorer... Pin
Vortex17-Aug-02 7:00
Vortex17-Aug-02 7:00 
GeneralRe: Launch the Internet Explorer... Pin
Nnamdi Onyeyiri17-Aug-02 7:06
Nnamdi Onyeyiri17-Aug-02 7:06 
GeneralRe: Launch the Internet Explorer... Pin
wobble17-Aug-02 7:13
wobble17-Aug-02 7:13 
GeneralRe: Launch the Internet Explorer... Pin
Nnamdi Onyeyiri17-Aug-02 7:16
Nnamdi Onyeyiri17-Aug-02 7:16 
GeneralMySQL databases Pin
Nnamdi Onyeyiri17-Aug-02 6:53
Nnamdi Onyeyiri17-Aug-02 6:53 
GeneralRe: MySQL databases Pin
Nathan Blomquist17-Aug-02 7:25
Nathan Blomquist17-Aug-02 7:25 
GeneralRe: MySQL databases Pin
Anonymous17-Aug-02 9:32
Anonymous17-Aug-02 9:32 
GeneralInheritance question Pin
leppie17-Aug-02 3:33
leppie17-Aug-02 3:33 
Hi all

I have 4 classes. About 80% of there functions are common. So I make an abstract baseclass to inherit from and add any function that is common. The question is how should i declare the functions in the base class and how must i declare the functions that are not applicable in the inherited class. This is what I have come up with.

Option 1:
Abstract class:
protected void Function(){...}
Inherited class:
if needed:
public new Function(){ base.Function() } or
public new Function(){ ...implement...}
if not needed:
do nothing

Option 2:
Abstract class:
public void Function(){...}
Inherited class:
if needed:
do nothing if implementation is not different or
public override void Function(){...implement...}
if not needed:
private new void Function(){} //hide the member

What is the correct / suggested way?

ANy help appreciated Smile | :)

MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc
for more info. Big Grin | :-D
GeneralRe: Inheritance question Pin
James T. Johnson17-Aug-02 4:04
James T. Johnson17-Aug-02 4:04 
GeneralRe: Inheritance question Pin
leppie17-Aug-02 4:44
leppie17-Aug-02 4:44 
GeneralRe: Inheritance question Pin
James T. Johnson17-Aug-02 5:38
James T. Johnson17-Aug-02 5:38 
GeneralRe: Inheritance question Pin
leppie17-Aug-02 6:02
leppie17-Aug-02 6:02 
GeneralRe: Inheritance question Pin
James T. Johnson17-Aug-02 6:20
James T. Johnson17-Aug-02 6:20 
GeneralRe: Inheritance question Pin
Stephane Rodriguez.17-Aug-02 7:36
Stephane Rodriguez.17-Aug-02 7:36 
GeneralRe: Inheritance question Pin
Kevin McFarlane18-Aug-02 10:31
Kevin McFarlane18-Aug-02 10:31 
GeneralRe: Inheritance question Pin
leppie18-Aug-02 23:32
leppie18-Aug-02 23:32 
GeneralDNS query - help Pin
ace_mim16-Aug-02 23:20
ace_mim16-Aug-02 23:20 
GeneralRe: DNS query - help Pin
James T. Johnson17-Aug-02 2:08
James T. Johnson17-Aug-02 2:08 
GeneralRe: DNS query - help Pin
Richard Deeming19-Aug-02 1:14
mveRichard Deeming19-Aug-02 1:14 
Generalforcibly unloading a .NET dll Pin
Nish Nishant16-Aug-02 20:27
sitebuilderNish Nishant16-Aug-02 20:27 
GeneralRe: forcibly unloading a .NET dll Pin
James T. Johnson17-Aug-02 1:23
James T. Johnson17-Aug-02 1:23 
GeneralRe: forcibly unloading a .NET dll Pin
Nish Nishant17-Aug-02 9:52
sitebuilderNish Nishant17-Aug-02 9:52 
GeneralWindows Message Handling Pin
ke5in16-Aug-02 17:42
ke5in16-Aug-02 17:42 
GeneralRe: Windows Message Handling Pin
leppie16-Aug-02 18:43
leppie16-Aug-02 18:43 
GeneralRe: Windows Message Handling Pin
James T. Johnson17-Aug-02 1:43
James T. Johnson17-Aug-02 1:43 

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.