Update improvements.md

This commit is contained in:
Mark J Price 2023-10-12 07:15:35 +01:00
parent 769d925d39
commit 4456b99b77

View file

@ -628,9 +628,7 @@ public interface IKeyHolder
}
```
An improvement would be to point out that for interfaces, the default access modifier is `internal` and the default access modifier for interface members is `public` (instead of `private` which is the default for types like classes).
In the examples above, both `Lose` methods must be `public` in any types that implement them. The members of an interface can only be `public` or `internal` unless they are given default implementations.
An improvement would be to point out that for interfaces, the default access modifier is `internal` and the default access modifier for interface members is `public` (instead of `private` which is the default for types like classes). The members of an interface can only be `public` or `internal` unless they are given default implementations.
In the next edition, I will add comments, as shown in the following code: