Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: How did you learn to program? Pin
Hamid_RT13-Dec-06 22:20
Hamid_RT13-Dec-06 22:20 
AnswerRe: How did you learn to program? Pin
SpartanSoft14-Dec-06 9:03
SpartanSoft14-Dec-06 9:03 
QuestionObject Factories with Lazy Loading in C# Pin
cebyrjoe213-Dec-06 10:46
cebyrjoe213-Dec-06 10:46 
AnswerRe: Object Factories with Lazy Loading in C# Pin
Colin Angus Mackay13-Dec-06 11:22
Colin Angus Mackay13-Dec-06 11:22 
Question[Message Deleted] Pin
R_L_H13-Dec-06 9:49
R_L_H13-Dec-06 9:49 
AnswerRe: How do you programmatically restart a Service? (specifically SQL Server) Pin
Colin Angus Mackay13-Dec-06 11:29
Colin Angus Mackay13-Dec-06 11:29 
GeneralRe: How do you programmatically restart a Service? (specifically SQL Server) Pin
navyjax224-Dec-08 13:14
navyjax224-Dec-08 13:14 
AnswerRe: How do you programmatically restart a Service? (specifically SQL Server) Pin
Andy Brummer13-Dec-06 11:37
sitebuilderAndy Brummer13-Dec-06 11:37 
QuestionResize row height in DataGrid (Pocket PC)? Pin
george ivanov13-Dec-06 7:17
george ivanov13-Dec-06 7:17 
Questionwin form datagridview sort by column Pin
fmardani13-Dec-06 6:07
fmardani13-Dec-06 6:07 
AnswerRe: win form datagridview sort by column Pin
Milky Way13-Dec-06 10:17
Milky Way13-Dec-06 10:17 
QuestionUnable to Deserialize - [cannot find an Assembly ] Pin
Eytukan13-Dec-06 5:48
Eytukan13-Dec-06 5:48 
AnswerRe: Unable to Deserialize - [cannot find an Assembly ] Pin
Karthik Kalyanasundaram13-Dec-06 6:03
Karthik Kalyanasundaram13-Dec-06 6:03 
GeneralRe: Unable to Deserialize - [cannot find an Assembly ] Pin
Eytukan13-Dec-06 18:05
Eytukan13-Dec-06 18:05 
QuestionDataTable.AcceptChanges Pin
wasife13-Dec-06 5:19
wasife13-Dec-06 5:19 
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 

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.