Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interface Implementation Problem
Message
From
27/06/2010 22:32:05
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01470728
Message ID:
01470747
Views:
43
>I changed the scope of a method from public to protected, and now I get this:
>
>
>Chess.PieceBase' does not implement interface member 'Chess.IPiece.DetermineTargets()'. 'Chess.PieceBase.DetermineTargets()
>cannot implement an interface member because it is not public.	C:\Projects\Chess\Chess\Pieces\PieceBase.cs
>
>
>Why does a method defined in an interface need to be public?

Because if a method is not public, then it won't be used outside of the class, and therefore doesn't need to be defined in the interface.
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform