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

C#

 
QuestionC# interface inheritance Pin
Shane55557-Mar-10 3:06
Shane55557-Mar-10 3:06 
AnswerRe: C# interface inheritance Pin
#realJSOP7-Mar-10 3:13
mve#realJSOP7-Mar-10 3:13 
AnswerRe: C# interface inheritance Pin
DaveyM697-Mar-10 3:44
professionalDaveyM697-Mar-10 3:44 
GeneralRe: C# interface inheritance Pin
harold aptroot7-Mar-10 4:27
harold aptroot7-Mar-10 4:27 
GeneralRe: C# interface inheritance Pin
AspDotNetDev7-Mar-10 5:58
protectorAspDotNetDev7-Mar-10 5:58 
GeneralRe: C# interface inheritance Pin
harold aptroot7-Mar-10 6:24
harold aptroot7-Mar-10 6:24 
AnswerRe: C# interface inheritance Pin
Shane55557-Mar-10 4:08
Shane55557-Mar-10 4:08 
GeneralRe: C# interface inheritance Pin
AspDotNetDev7-Mar-10 4:16
protectorAspDotNetDev7-Mar-10 4:16 
Not really sure what your question is. Sounds like you just want to create an interface and implement it with a class. That's pretty basic C#... that's all I've gathered from your question (now that you've added the disclaimer about not using string as an example anymore because it's sealed). You might want to take a look at my StringBuilderPlus Improves Upon StringBuilder article, which makes use of interfaces and implementing those interfaces. The diagram at the bottom of the article shows the interface IString and the two classes, PlainString and StringsWrapper, that implement IString. Download the code if you want to see how that's done.

Shane5555 wrote:
inheriting from a class to an interface would be a LOT cleaner


An interface cannot inherit from a class, but a class can inherit from a class. And a class can implement an interface. And an interface can inherit from an interface.
GeneralRe: C# interface inheritance Pin
PIEBALDconsult7-Mar-10 14:24
mvePIEBALDconsult7-Mar-10 14:24 
QuestionOOPs And Debugging Techniques Pin
DotNetMan7-Mar-10 1:21
DotNetMan7-Mar-10 1:21 
AnswerRe: OOPs And Debugging Techniques Pin
dan!sh 7-Mar-10 1:28
professional dan!sh 7-Mar-10 1:28 
AnswerRe: OOPs And Debugging Techniques Pin
AspDotNetDev7-Mar-10 3:00
protectorAspDotNetDev7-Mar-10 3:00 
AnswerRe: OOPs And Debugging Techniques Pin
dybs7-Mar-10 15:22
dybs7-Mar-10 15:22 
AnswerRe: OOPs And Debugging Techniques Pin
N a v a n e e t h7-Mar-10 3:33
N a v a n e e t h7-Mar-10 3:33 
AnswerRe: OOPs And Debugging Techniques Pin
DotNetMan9-Mar-10 1:07
DotNetMan9-Mar-10 1:07 
QuestionPrint Message that is printed in Windows Service Application Pin
Abdul Rahman Hamidy7-Mar-10 0:50
Abdul Rahman Hamidy7-Mar-10 0:50 
AnswerRe: Print Message that is printed in Windows Service Application Pin
dan!sh 7-Mar-10 1:32
professional dan!sh 7-Mar-10 1:32 
GeneralRe: Print Message that is printed in Windows Service Application Pin
Abdul Rahman Hamidy7-Mar-10 17:24
Abdul Rahman Hamidy7-Mar-10 17:24 
QuestionAssembling bytes to an image Pin
Wamuti6-Mar-10 23:18
Wamuti6-Mar-10 23:18 
AnswerRe: Assembling bytes to an image Pin
OriginalGriff6-Mar-10 23:48
mveOriginalGriff6-Mar-10 23:48 
GeneralRe: Assembling bytes to an image Pin
Wamuti6-Mar-10 23:55
Wamuti6-Mar-10 23:55 
GeneralRe: Assembling bytes to an image Pin
OriginalGriff7-Mar-10 0:52
mveOriginalGriff7-Mar-10 0:52 
AnswerRe: Assembling bytes to an image Pin
dan!sh 6-Mar-10 23:49
professional dan!sh 6-Mar-10 23:49 
GeneralRe: Assembling bytes to an image Pin
Wamuti6-Mar-10 23:58
Wamuti6-Mar-10 23:58 
AnswerRe: Assembling bytes to an image Pin
DX Roster7-Mar-10 20:17
DX Roster7-Mar-10 20:17 

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.