File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
csharp/tutorials/mixins-with-interfaces Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace mixins_with_interfaces
8
8
// <SnippetBlinkingLight>
9
9
public interface IBlinkingLight : ILight
10
10
{
11
- public virtual async Task Blink ( int duration , int repeatCount )
11
+ public async Task Blink ( int duration , int repeatCount )
12
12
{
13
13
Console . WriteLine ( "Using the default interface method for IBlinkingLight.Blink." ) ;
14
14
for ( int count = 0 ; count < repeatCount ; count ++ )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public interface ILight
22
22
void SwitchOn ( ) ;
23
23
void SwitchOff ( ) ;
24
24
bool IsOn ( ) ;
25
- public virtual PowerStatus Power ( ) => PowerStatus . NoPower ;
25
+ public PowerStatus Power ( ) => PowerStatus . NoPower ;
26
26
}
27
27
// </SnippetILightInterface>
28
28
}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace mixins_with_interfaces
8
8
// <SnippetTimerLightFinal>
9
9
public interface ITimerLight : ILight
10
10
{
11
- public virtual async Task TurnOnFor ( int duration )
11
+ public async Task TurnOnFor ( int duration )
12
12
{
13
13
Console . WriteLine ( "Using the default interface method for the ITimerLight.TurnOnFor." ) ;
14
14
SwitchOn ( ) ;
Original file line number Diff line number Diff line change 3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
5
<TargetFramework >netcoreapp3.0</TargetFramework >
6
- <RootNamespace >virtual_interface_methods </RootNamespace >
6
+ <RootNamespace >mixins_with_interfaces </RootNamespace >
7
7
</PropertyGroup >
8
8
9
9
</Project >
You can’t perform that action at this time.
0 commit comments