Click here to Skip to main content
16,009,705 members
Home / Discussions / C#
   

C#

 
GeneralRe: Insert a graphics in an other graphics Pin
troz20-Aug-02 21:32
troz20-Aug-02 21:32 
GeneralInterfaces and Static methods - How could they!!! Pin
Ryan Cromwell20-Aug-02 4:11
Ryan Cromwell20-Aug-02 4:11 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
leppie20-Aug-02 4:23
leppie20-Aug-02 4:23 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
Ryan Cromwell20-Aug-02 4:43
Ryan Cromwell20-Aug-02 4:43 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
Philip Fitzsimons20-Aug-02 4:48
Philip Fitzsimons20-Aug-02 4:48 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
leppie20-Aug-02 5:13
leppie20-Aug-02 5:13 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
Ryan Cromwell20-Aug-02 7:08
Ryan Cromwell20-Aug-02 7:08 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
leppie20-Aug-02 7:29
leppie20-Aug-02 7:29 
Cromwell wrote:
If it isn't static you have just instanciated two IChalk objects by returning an IChalk object.

You would have to instanciated an IChalk object to use an IChalk object. Remember the type of the IChalk object will not be IChalk, it will be the actuall type of the class

I think we should look back at the definition of an interface and if they really needed in your case. From what I can see, a base class with some abstract methods (those you would use with the original interface) will provided the best solution in your case and it would pretty much function the same.

From MSDN:

An interface:

An interface defines a contract. A class or struct that implements an interface must adhere to its contract. An interface may inherit from multiple base interfaces, and a class or struct may implement multiple interfaces.

Interfaces can contain methods, properties, events, and indexers. The interface itself does not provide implementations for the members that it defines. The interface merely specifies the members that must be supplied by classes or interfaces that implement the interface.


An abstract class:

When a non-abstract class is derived from an abstract class, the non-abstract class must include actual implementations of all inherited abstract members. Such implementations are provided by overriding the abstract members.


MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc
for more info. Big Grin | :-D
GeneralRe: Interfaces and Static methods - How could they!!! Pin
James T. Johnson20-Aug-02 7:38
James T. Johnson20-Aug-02 7:38 
GeneralRe: Interfaces and Static methods - How could they!!! Pin
Ryan Cromwell20-Aug-02 7:52
Ryan Cromwell20-Aug-02 7:52 
GeneralIDE hangs up on executing ! Pin
EdgarBM20-Aug-02 0:16
EdgarBM20-Aug-02 0:16 
GeneralRe: IDE hangs up on executing ! Pin
Nnamdi Onyeyiri20-Aug-02 0:52
Nnamdi Onyeyiri20-Aug-02 0:52 
GeneralRe: IDE hangs up on executing ! Pin
James T. Johnson20-Aug-02 5:44
James T. Johnson20-Aug-02 5:44 
GeneralRe: IDE hangs up on executing ! Pin
Nnamdi Onyeyiri20-Aug-02 6:12
Nnamdi Onyeyiri20-Aug-02 6:12 
GeneralRe: IDE hangs up on executing ! Pin
Stephane Rodriguez.20-Aug-02 1:22
Stephane Rodriguez.20-Aug-02 1:22 
GeneralRe: IDE hangs up on executing ! Pin
EdgarBM20-Aug-02 1:26
EdgarBM20-Aug-02 1:26 
GeneralRe: IDE hangs up on executing ! Pin
Nnamdi Onyeyiri20-Aug-02 3:16
Nnamdi Onyeyiri20-Aug-02 3:16 
GeneralRe: IDE hangs up on executing ! Pin
leppie20-Aug-02 3:33
leppie20-Aug-02 3:33 
GeneralRe: IDE hangs up on executing ! Pin
Anonymous20-Aug-02 3:39
Anonymous20-Aug-02 3:39 
GeneralRe: IDE hangs up on executing ! Pin
Anonymous20-Aug-02 4:15
Anonymous20-Aug-02 4:15 
GeneralRe: IDE hangs up on executing ! Pin
James T. Johnson20-Aug-02 5:42
James T. Johnson20-Aug-02 5:42 
GeneralRe: IDE hangs up on executing ! Pin
EdgarBM20-Aug-02 23:04
EdgarBM20-Aug-02 23:04 
GeneralCombobox and SetItemData Pin
Michael P Butler19-Aug-02 23:51
Michael P Butler19-Aug-02 23:51 
GeneralRe: Combobox and SetItemData Pin
Nnamdi Onyeyiri20-Aug-02 0:02
Nnamdi Onyeyiri20-Aug-02 0:02 
GeneralRe: Combobox and SetItemData Pin
Michael P Butler20-Aug-02 0:25
Michael P Butler20-Aug-02 0:25 

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.