mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-07 23:37:32 +02:00
Merge pull request #1461 from csuich2/csharp-single-inheritance
Added detail on C# single inheritance
This commit is contained in:
@@ -837,7 +837,8 @@ on a new line! ""Wow!"", the masses cried";
|
|||||||
bool Broken { get; } // interfaces can contain properties as well as methods & events
|
bool Broken { get; } // interfaces can contain properties as well as methods & events
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class can inherit only one other class, but can implement any amount of interfaces
|
// Class can inherit only one other class, but can implement any amount of interfaces, however
|
||||||
|
// the base class name must be the first in the list and all interfaces follow
|
||||||
class MountainBike : Bicycle, IJumpable, IBreakable
|
class MountainBike : Bicycle, IJumpable, IBreakable
|
||||||
{
|
{
|
||||||
int damage = 0;
|
int damage = 0;
|
||||||
|
Reference in New Issue
Block a user