Skip to content

Commit 3c71f3c

Browse files
BillWagnerCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 0fb66b6 commit 3c71f3c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

docs/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Some of these extended capabilities could be emulated in devices that support th
4040

4141
Default interface members provide a better solution for this scenario than extension members. Class authors can control which interfaces they choose to implement. Those interfaces they choose are available as methods. In addition, because default interface methods are virtual by default, the method dispatch always chooses the implementation in the class.
4242

43-
Let's create the code that demonstrates these differences.
43+
Let's create the code to demonstrate these differences.
4444

4545
## Create interfaces
4646

@@ -106,7 +106,7 @@ The following code in your `Main` method creates each light type in sequence and
106106

107107
## How the compiler determines best implementation
108108

109-
This scenario shows a base interface without any implementations. Adding a method into the `ILight` interface introduces new complexities. The language rules governing default interface methods minimize the effect on the concrete classes that implement multiple derived interfaces. Let's enhance the original interface with a new method that shows how that changes its use. Every indicator light can report its power status as an enumerated value:
109+
This scenario shows a base interface without any implementations. Adding a method into the `ILight` interface introduces new complexities. The language rules governing default interface methods minimize the effect on the concrete classes that implement multiple derived interfaces. Let's enhance the original interface with a new method to show how that changes its use. Every indicator light can report its power status as an enumerated value:
110110

111111
:::code language="csharp" source="./snippets/mixins-with-default-interface-methods/ILight.cs" id="SnippetPowerStatus":::
112112

docs/csharp/language-reference/builtin-types/enum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ C# allows implicit conversions from the literal value `0` to any enum type, and
4747

4848
:::code language="csharp" source="snippets/shared/EnumType.cs" id="SnippetZeroConversions":::
4949

50-
In the preceding example, both `port1` and `port2` are assigned to the value `0`, but `GpioPort` has no member with that value. The <xref:System.Enum.IsDefined%2A?displayProperty=nameWithType> method confirms that 0 is an invalid enum value.
50+
In the preceding example, both `port1` and `port2` are assigned to the value `0`, but `GpioPort` has no member with that value. The <xref:System.Enum.IsDefined%2A?displayProperty=nameWithType> method confirms these are invalid enum values.
5151

5252
This implicit conversion exists because the 0-bit pattern is the default for all struct types, including all enum types. However, it can introduce bugs in your code. To avoid these issues:
5353

@@ -67,7 +67,7 @@ For more information and examples, see the <xref:System.FlagsAttribute?displayPr
6767

6868
## The System.Enum type and enum constraint
6969

70-
The <xref:System.Enum?displayProperty=nameWithType> type is the abstract base class of all enumeration types. It provides many methods to get information about an enumeration type and its values. For more information and examples, see the <xref:System.Enum?displayProperty=nameWithType> API reference page.
70+
The <xref:System.Enum?displayProperty=nameWithType> type is the abstract base class of all enumeration types. It provides a number of methods to get information about an enumeration type and its values. For more information and examples, see the <xref:System.Enum?displayProperty=nameWithType> API reference page.
7171

7272
You can use `System.Enum` in a base class constraint (that is known as the [enum constraint](../../programming-guide/generics/constraints-on-type-parameters.md#enum-constraints)) to specify that a type parameter is an enumeration type. Any enumeration type also satisfies the `struct` constraint, which is used to specify that a type parameter is a non-nullable value type.
7373

docs/csharp/language-reference/operators/deconstruction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Deconstruction expression - extract properties or fields from a tuple or other type"
33
description: "Learn about deconstruction expressions: expressions that extract individual properties or fields from a tuple or user defined type into discrete expressions."
4-
ms.date: 11/24/2024
4+
ms.date: 11/24/2025
55
---
66
# Deconstruction expression - Extract properties of fields from a tuple or other user-defined type
77

docs/csharp/language-reference/statements/iteration-statements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ foreach (var item in collection) { }
118118
```
119119

120120
> [!NOTE]
121-
> The compiler infers `var` declarations as nullable reference types, depending on whether the [nullable aware context](../../language-reference/builtin-types/nullable-reference-types.md) is enabled and whether the type of an initialization expression is a reference type.
121+
> The type of a `var` declaration can be inferred by the compiler as a nullable reference type, depending on whether the [nullable aware context](../../language-reference/builtin-types/nullable-reference-types.md) is enabled and whether the type of an initialization expression is a reference type.
122122
> For more information, see [Implicitly-typed local variables](./declarations.md#implicitly-typed-local-variables).
123123

124124
You can also explicitly specify the type of an iteration variable, as the following code shows:

docs/csharp/methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Methods are declared in a `class`, `record`, or `struct` by specifying:
2222
- The method name.
2323
- Any method parameters. Method parameters are enclosed in parentheses and are separated by commas. Empty parentheses indicate that the method requires no parameters.
2424

25-
These parts together comprise the method signature.
25+
These parts together form the method signature.
2626

2727
> [!IMPORTANT]
2828
> A return type of a method isn't part of the signature of the method for the purposes of method overloading. However, it's part of the signature of the method when determining the compatibility between a delegate and the method that it points to.

0 commit comments

Comments
 (0)