The tag has no wiki summary.

learn more… | top users | synonyms

42
votes
7answers
29k views

When to use abstract classes instead of interfaces with extension methods in C#?

"Abstract class" and "interface" are similar concepts, with interface being the more abstract of the two. One differentiating factor is that abstract classes provide method implementations for derived ...
1
vote
2answers
2k views

What other reasons are there to write interfaces rather than abstract classes? [duplicate]

Possible Duplicate: When to use abstract classes instead of interfaces and extension methods in C#? When I read and looked at codes using Abstract classes, I was able to justify it because ...
10
votes
6answers
6k views

What are the differences between abstract classes, interfaces, and when to use them

Recently I have started to wrap my head around OOP, and I am now to the point where the more I read about the differences between abstract classes and interfaces the more confused I become. So far, ...
4
votes
6answers
3k views

What are abstract classes and abstract methods?

I got several explanations but so far I'm not able to understand that what are the abstract classes and methods in Java. Some said it has to do something with the security of the program, other said ...
0
votes
3answers
274 views

Force Derived Class to Implement Static Method C#

So the situation is like, I have few classes, all of which have a standard CRUD methods but static. I want to create a base class which will be inherited so that it can force to implement this CRUD ...
0
votes
4answers
684 views

Why 'List<E>' is an 'interface' but not 'abstract class'?

While defining the hierarchy, one can think to embed the abstract method(behaviour) in abstract class only because the derive concrete class posses that as core behaviour with it's specific ...
1
vote
1answer
435 views

Interface Dependencies or Abstract Classes

I have a decision to make and I am wondering what would be the better solution. I am refactoring an older application and intend to really get into the nuts and bolts of it. There are 8 report types ...
5
votes
6answers
4k views

Is there any difference between interfaces and abstract classes that have abstract methods only?

Let's say we have an abstract class and let this class has only abstract methods. Is this abstract class different from an interface that has same methods only? What I am looking to know is if there ...
3
votes
4answers
7k views

Abstract class + Inheritance vs Interface

Hello fellow programmers, I am reading a book on C# and the author is comparing Abstract classes and Interfaces. He claims that if you have the following "abstract class:" abstract class ...
0
votes
2answers
215 views

How To Invoke A Method When It's Class is Accessed (Any Method) - “OnClassEnter”

I am working on a C# net micro framework project, in particular an I2C bus management/class. I have several different I2C devices each defined in separate classes which contain all of the devices' ...