interface

internal member in an interface

I have a list of objects implementing an interface, and a list of that interface: public interface IAM { int ID { get; set; } void Save(); } public class concreteIAM : IAM { public int ID{get;set;} internal void Save(){ //save the object } //other staff for this particular class } public class MyList : List<I...

How do you create an Interface between two projects, not referenced

How can two classes in separate projects communicate between one another? If ClassA references ClassB I can access methods of ClassB in ClassA ... .... How can I make use of Interfaces to access methods of ClassA in ClassB. Indeed do the classes even need to be linked if I make use of Interfaces? Can someone please provide me with an ...

C# Apply Interface to a Form Class

How can I apply an Interface to a form class partial class Form1 : Form, InterfaceA Is this correct? Basically I would like to implement an Interface on a form. How To .... ...

C# Interface (Call Method in Different Project/Assembly)

The code below pretty much sums up what I want to achieve. We have a solution which comprises many different projects however we have a need to be able to call methods in projects from projects which are not referenced (would cause circular reference). I have posted previous questions and the code below is pretty much what I have come...

Cocoa Interface Style

I'm on a project doing an iPhone application. We had a Cocoa consultant come in for a few weeks. He showed me an interesting idiom of Cocoa, dealing with interfaces, but there was a difficult language barrier between us, and he wasn't really able to explain why this was done or where it was documented so I could learn more on my own. I w...

Difference between abstract class and interface in Python

What is the difference between abstract class and interface in Python? ...

How to implement a readonly (immutable) object interface in C#

What I need is to make sure that in most scenarios objects are used via "readonly interface", which is a subset of the full interface. If I were in C++, I would just return a const object, for instance. If I could use interfaces, I would just implement a readonly interface and use it everywhere, however, I need operator overloading, wh...

Java interface inheritance and implementation

I saw in the apache camel source code that public class DefaultCamelContext extends ServiceSupport implements CamelContext, Service My question is why this definition since public interface CamelContext extends Service and also public abstract class ServiceSupport implements Service Shouldn't it be just public class DefaultCam...

Jitterbit vs. BizTalk

Is there anyone who has used or looked into using Jitterbit as well as BizTalk? If so, what are some pros and cons of each, and which one did you go with as your final solution? Specifically, I'm looking for SAP integration, but any input would be appreciated. ...

What is an Empty interface used for

I am looking at nServiceBus and came over this interface namespace NServiceBus { public interface IMessage { } } What is the use of an empty interface? ...

SAP .NET Connector: System exception thrown while marshaling .NET type...

My app sends lots and lots of data to SAP. To di this, it builds up an SAP table object and sends it over. I get this error somewhat regularly, but not reliably: System exception thrown while marshaling .NET type 20081219 to RFCTYPE_BCD at SAP.Connector.Rfc.RfcMarshal.NetFieldToRfcField(Object src, RFCTYPE type, Encoding encoding, By...

Documentation about Roles

Hello, some time ago I found an article (Roles: Composable Units of Object Behavior) describing the pros of using Roles versus Interfaces or other ways of dealing with behavior requirements. Does any of you knows where I can find more literature about that, or knows more about Roles? I know that that's almost a research topic, but maybe...

What does it mean to "program to an interface"?

Hi, I have seen this mentioned a few times and I am not totally clear on what it means. When and why would you do this? I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly. Is it just so if you were to do: IInterface classRef = new ObjectWhatever() You could use ...

Can something be initializable?

I've created an interface called Initializable, but according to Dictionary.com this is not a word. Searching Google only gives about 30k results and they are mostly API references. Is there another word to describe something that can be initialized (which is a word)? Edit: Thanks for the questions about it being in the constructor, t...

Description of what an Interface does?

Duplicate: http://stackoverflow.com/questions/122883/interfaces-why-cant-i-seem-to-grasp-them With regards to OOP,how would you describe an interface? What i mean is , sub-classing can be described as "Has-A" and Inheritance could be "Is-A". A member method could be "Can-Do" .. Is there any way this could be extended (no pun intended)...

Given an Object, How can I programatically tell what Interfaces it supports?

Given this: Interface IBase {string X {get;set;}} Interface ISuper {string Y {get;set;}} class Base : IBase {etc...} class Super : Base, ISuper {etc...} void Questionable (Base b) { Console.WriteLine ("The class supports the following interfaces... ") // The Magic Happens Here } What can I replace "The Magic" with to display the...

C# Objects, Interfaces and the Database

In working with objects and interfaces what is the best practice for writing to the database? There is a plethora of opinions regarding the object design but I am unclear about the database end. A simple example: Suppose a Contact base class that contains the common fields such as contact name (Bill, Fred, Sally) and a location (home, ...

What is for the Index option in TRemotable derivated classes?

When WSDL importer wizard generates the interfaces, all properties have the Index option, but reading the code and the InvokeRegistry unit, I can't found what is that for, anyone know if it is really necessary? Like this Login = class(TRemotable) private [...] published property User: string Index (IS_OPTN) read GetUser ...

Why explicit interface implementation?

I recently implemented a class like: class TestClass : IDisposable { RegistryKey m_key; public TestClass() { m_key = Registry.CurrentUser.OpenSubKey("Software", false); } public void Dispose() { // m_key.Dispose(); IDisposable disp = m_key; disp.Dispose(); } } If I uncomment...

Accessing an application's COM interface using C++ or C

In response to question, how can I (or find more information to) automate certain functionality without user intervention, from a C++ (or C) using: ATL Or Automation code directly in C/C++ Regards ...