Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
QuestionViewing large database Pin
Pius__X1-Apr-06 10:17
Pius__X1-Apr-06 10:17 
Questioncreating file on remote site c# Pin
shamsallana1-Apr-06 9:25
shamsallana1-Apr-06 9:25 
QuestionForbid to enter backspace in a textbox Pin
Ralf Hägenläuer1-Apr-06 9:16
Ralf Hägenläuer1-Apr-06 9:16 
AnswerRe: Forbid to enter backspace in a textbox Pin
Ed.Poore1-Apr-06 10:14
Ed.Poore1-Apr-06 10:14 
QuestionReturning from a modal form? (never mind) Pin
Ravi Bhavnani1-Apr-06 7:36
professionalRavi Bhavnani1-Apr-06 7:36 
QuestionQuestion about polymorphism.. Pin
e-laj1-Apr-06 5:52
e-laj1-Apr-06 5:52 
AnswerRe: Question about polymorphism.. Pin
leppie1-Apr-06 6:07
leppie1-Apr-06 6:07 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 12:04
ricardojb1-Apr-06 12:04 
public abstract class Class1
{
protected abstract void Method1();
}
public interface IInterface1
{
void Method1();
}
public class Class2: Class1
{
protected override void Method1()
{
//....
}
public void HelperMethod()
{
this.Method1();
}
}
public class Class3 : Class2, IInterface1
{
}

this would do it, I don't really see why you would to through all this trouble but it will work.

Class1 is abstract and declares a protected abstract method that Class2 must implement.

Interface1 also requires the same method.

Class3 inherits Class2 and the interface, but because the method is protected, it can't see it, so it needs to explicitly implement it because of the interface, additionally, the HelperMethod gives public access to Method1, this way the method is still public but the Method that follows the rules is not visible to the classes down the hierarchy.
NewsRe: Question about polymorphism.. Pin
leppie1-Apr-06 16:40
leppie1-Apr-06 16:40 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 16:43
ricardojb1-Apr-06 16:43 
GeneralRe: Question about polymorphism.. Pin
leppie1-Apr-06 17:00
leppie1-Apr-06 17:00 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 17:03
ricardojb1-Apr-06 17:03 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 17:13
ricardojb1-Apr-06 17:13 
GeneralRe: Question about polymorphism.. Pin
leppie1-Apr-06 23:26
leppie1-Apr-06 23:26 
GeneralRe: Question about polymorphism.. Pin
ricardojb1-Apr-06 17:01
ricardojb1-Apr-06 17:01 
QuestionHelp me please.. Pin
KORCARI1-Apr-06 5:38
KORCARI1-Apr-06 5:38 
AnswerRe: Help me please.. Pin
ricardojb1-Apr-06 11:43
ricardojb1-Apr-06 11:43 
QuestionC# & Sound Function Pin
hung_ngole1-Apr-06 5:08
hung_ngole1-Apr-06 5:08 
QuestionSpell checker for microsoft word Pin
iinfoque1-Apr-06 4:00
iinfoque1-Apr-06 4:00 
AnswerRe: Communicating with a USB Device Pin
leppie1-Apr-06 2:55
leppie1-Apr-06 2:55 
QuestionSudoku 4 Mobile phone Pin
t4ure4n1-Apr-06 1:43
t4ure4n1-Apr-06 1:43 
QuestionDisplaying 0\0 Pin
thepersonof1-Apr-06 1:42
thepersonof1-Apr-06 1:42 
AnswerRe: Displaying 0\0 Pin
Nicholas Butler1-Apr-06 1:45
sitebuilderNicholas Butler1-Apr-06 1:45 
GeneralRe: Displaying 0\0 Pin
thepersonof1-Apr-06 2:29
thepersonof1-Apr-06 2:29 
GeneralRe: Displaying 0\0 Pin
leppie1-Apr-06 3:02
leppie1-Apr-06 3:02 

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.