Click here to Skip to main content
15,900,258 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataTable.AcceptChanges Pin
Andrew Rissing13-Dec-06 7:23
Andrew Rissing13-Dec-06 7:23 
QuestionWriting to an access database with credentials Pin
Beaumont113-Dec-06 4:28
Beaumont113-Dec-06 4:28 
AnswerRe: Writing to an access database with credentials Pin
led mike13-Dec-06 6:39
led mike13-Dec-06 6:39 
GeneralRe: Writing to an access database with credentials Pin
Beaumont113-Dec-06 7:11
Beaumont113-Dec-06 7:11 
GeneralRe: Writing to an access database with credentials Pin
led mike13-Dec-06 7:22
led mike13-Dec-06 7:22 
GeneralRe: Writing to an access database with credentials Pin
Beaumont113-Dec-06 7:24
Beaumont113-Dec-06 7:24 
Questionhow to read from a ethernet connection Pin
faladrim13-Dec-06 3:43
faladrim13-Dec-06 3:43 
QuestionClass inheritance and interfaces Pin
Dario Solera13-Dec-06 3:39
Dario Solera13-Dec-06 3:39 
A strange question, but I couldn't find anything specific and just trying is not the solution.

Suppose I have two interfaces, lets call them IMyInterface1 an IMyInterface2.
They share a couple of methods (they're identical), but I don't want to use a shared interface with just those methods and then inherit my two interfaces from that one.

Now I have two classes (MyClass1 and MyClass2), each one implementing one of the two interfaces. Both of them must inherit from another class (MarshalByRefObject).

The question is: can I extract a class (MyCommonClass) implementing the common methods of the interfaces, inherit from that class and implement the two classes just implementing the remaining methods? This way MyCommonClass should inherit from MarshalByRefObject, then MyClass1 and MyClass2 should inherit from MyCommonClass.

Are the two interfaces correctly implemented in the compiler's opinion?

Brief pseudo-code:

class MyCommonClass : MarshalByRefObject; // Implementing common methods of IMyInterface1 and IMyInterface2
class MyClass1 : MyCommonClass, IMyInterface1; // Implementing the remaining methods of IMyInterface1
class MyClass2 : MyCommonClass, IMyInterface2; // Implementing the remaining methods of IMyInterface2


Thanks for any help.

________________________________________________
Personal Blog [ITA] - Tech Blog [ENG]
Developing ScrewTurn Wiki 2.0 (2.0 Alpha is out)

AnswerRe: Class inheritance and interfaces Pin
J4amieC13-Dec-06 3:45
J4amieC13-Dec-06 3:45 
GeneralRe: Class inheritance and interfaces Pin
Dario Solera13-Dec-06 3:52
Dario Solera13-Dec-06 3:52 
QuestionHow to insert listbox[multiselect] data Pin
mohd imran abdul aziz13-Dec-06 3:31
mohd imran abdul aziz13-Dec-06 3:31 
AnswerRe: How to insert listbox[multiselect] data Pin
althamda13-Dec-06 4:25
althamda13-Dec-06 4:25 
GeneralRe: How to insert listbox[multiselect] data Pin
mohd imran abdul aziz13-Dec-06 16:42
mohd imran abdul aziz13-Dec-06 16:42 
GeneralRe: How to insert listbox[multiselect] data Pin
althamda13-Dec-06 22:46
althamda13-Dec-06 22:46 
QuestionProblem with XML Pin
Bob Stanneveld13-Dec-06 3:11
Bob Stanneveld13-Dec-06 3:11 
AnswerRe: Problem with XML Pin
Not Active13-Dec-06 3:23
mentorNot Active13-Dec-06 3:23 
AnswerRe: Problem with XML Pin
User 665813-Dec-06 3:45
User 665813-Dec-06 3:45 
GeneralRe: Problem with XML Pin
Bob Stanneveld13-Dec-06 4:01
Bob Stanneveld13-Dec-06 4:01 
Generaldate time picker and translations Pin
V.13-Dec-06 2:54
professionalV.13-Dec-06 2:54 
QuestionCustom control and design time Pin
sypack13-Dec-06 2:41
sypack13-Dec-06 2:41 
AnswerRe: Custom control and design time Pin
il_masacratore13-Dec-06 3:30
il_masacratore13-Dec-06 3:30 
GeneralRe: Custom control and design time Pin
sypack14-Dec-06 21:12
sypack14-Dec-06 21:12 
QuestionInteraction b/w two windows services Pin
ratheeshk13-Dec-06 2:24
ratheeshk13-Dec-06 2:24 
QuestionResizing Image Pin
stanly jose13-Dec-06 1:18
stanly jose13-Dec-06 1:18 
AnswerRe: Resizing Image Pin
stancrm13-Dec-06 1:24
stancrm13-Dec-06 1:24 

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.