C# interfaces doesn't contain data members
C#
3
Posts
3
Posters
0
Views
1
Watching
-
Because it doesn't actually implement anything. It only provides a contract that states what methods/properties will be present.
Deja View - the feeling that you've seen this post before.
-
Because that is not the purpose of an interface. An
interface
defines the public interface* of a class (or part of a class) that implements the interface. If you want data members then you should look at implementing anabstract class
. * Note there is a difference betweeninterface
and interface
Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: AJAX, SQL Server, Mock Objects My: Website | Blog | Photos