I have an application that uses plugins that are managed via an interface I then dynamically load the plugin classes and cast them to the interface to work with them.
I have the following line of code, assume that IPlugin is my interface.
IPlugin _plugin = (IPlugin)Activator.CreateInstance(oInfo.Assembly, oInfo.FullyQualifiedName)
Th...
Hi,
Can anyone please explain to me what is the difference between IEnumerable & IEnumerator ,
and how to use them?
Thanks!!!
...
can we implement polymorphism using interface in c#? any example .
...
The title is hardly understandable, but I'm not sure how to summarize that another way. Any edit to clarify is welcome.
I have been told, and recommended to use interfaces to improve performances, even in a case which doesn't especially call for the regular "interface" role. In this case, the objects are big models (in a MVC meaning), w...
I have the following Interfaces:
public interface ITemplateItem
{
int Id { get; set; }
String Name { get; set; }
String Text { get; set; }
int CategoryId { get; set; }
int Typ { get; set; }
}
public interface ITemplateCategory
{
int Id { get; set; }
String Name { get; set; }
List<ITemplateItem> Templa...
Is it possible to a Java class to implement a C++ interface (interface meaning a full abstract class)?
Where can I read more about?
...
I would think that adding that attribute to an interface would be helpful make sure you do not create classes that use the interface and forget to make them serializable.
This could be a very fundamental question, but I wanted to ask the experts.
...
Hello,
I am trying to figure out if it is possible to implement a .NET interface, where the interface method has to return something and you are implementing that particular interface method with an asynchronous WCF service?
Hopefully you should already see the issue I am encountering.
Here is the interface:
public interface IDa...
I have a project with all my Interface definitions: RivWorks.Interfaces
I have a project where I define concrete implmentations: RivWorks.DTO
I've done this hundreds of times before but for some reason I am getting this error now:
Cannot implicitly convert type 'System.Collections.Generic.List<RivWorks.DTO.Product>' to 'System.Coll...
Using the release version of Visual Studio 2010 I think there's a difference in the "Implement Interface" expansion from VS2008
If I speicify an interface and implement it in a class as so:
public interface IRepository<T> where T : IModel
{
T Get<T>(int id);
void Update<T>(T item);
int Add<T>(T item);
}
public class Mo...
I have two interfaces IHeaderRow, and IDetailRow
I then have an object that implements both RawRow:IHeaderRow, IDetailRow
I then need to cast it to HeaderRow which implements IHeaderRow.
But when I try, it ends up being null or giving an exception.
I can cast ObjectRawRow to either interface IHeaderRow, or IDetailRow
var ObjectIHead...
Perhaps I'm misapplying Unity, but here goes. I have a couple of applications, both of which load the same plugin assemblies. All assemblies require a library, and I want them to be able to access this library via Unity. However, in order to use Unity, or any other IoC framework, I'd have to write an interface for this library. I wil...
I'm looking for a thin, generic layer (probably written in PHP) that sits between a database (probably MySQL) and web service clients (which could be anything). I imagine there would be config files of some sort that tell it how to map web service requests to database queries (or other DB commands). It would also need to handle authent...
I'm trying to get a UISplitViewController working with an iPad app.
I have the table view controller linked up under the Master pane and a plain UIView under the Detail view.
I also have [window addSubview:splitView.view]; in my code.
For some reason I just get a white screen even though the table view controller code is properly code...
I am currently new in OPC ( OLE for process control). I want to know about the interfaces IOPCServer, IOPCDataItem, IOPCGroup interfaces in the OPC. What are they used for & what is their role in terms of OPC Client & OPC Server & what methods & properties these interfaces conatins ? Can you provide me the answer for the above questions ...
I've been programming in Java for a few courses in the University and I have the following question:
Is it methodologically accepted that every class should implement an interface? Is it considered bad practice not to do so? Can you describe a situation where it's not a good idea to use interfaces?
Edit: Personally, I like the noti...
I am learning Java and just found that the Interface can have fields, which are public static and final. I haven't seen any examples of these so far. What are some of the use cases of these Interface Constants and can I see some in the Java Standard Library?
...
I know the title is a bit confusing but bare with me. (I'm up for suggestions on a new title lol)
I'm writing a TemplateEngine that will allow me to use my own markup in text based files. I'm wanting to add controls as plugins as the application matures. Currently i've got a structure like the following:
interface IControl
string Id...
My friend build a web service in java
I build one in .net
I want them to implement the same interface
then in my program change the web.config to point to one or the other.
In my mind this would be done by implementing the same interface. Not sure how it would actually be done...
...
Hi, I have a question.
Somebody, who was working on my code before me, created some method and passed Runnable as parameter, more likely:
void myMethod(Runnable runnable){ runnable.run(); }
Then calling myMethod out of main looks like:
public static void main(String args[])
{ try
{ myMethod(new Runnable(){ public void run() { //do...