Skip to content

Commit 0de9f44

Browse files
Johnny GérardRon Petrusha
authored andcommitted
Update expression-bodied-members.md (#6555)
There is no Show method in the Person class.
1 parent ab622e6 commit 0de9f44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/programming-guide/statements-expressions-operators/expression-bodied-members.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Support for expression body definitions was introduced for methods and property
3131

3232
An expression-bodied method consists of a single expression that returns a value whose type matches the method's return type, or, for methods that return `void`, that performs some operation. For example, types that override the <xref:System.Object.ToString%2A> method typically include a single expression that returns the string representation of the current object.
3333

34-
The following example defines a `Person` class that overrides the <xref:System.Object.ToString%2A> method with an expression body definition. It also defines a `Show` method that displays a name to the console. Note that the `return` keyword is not used in the `ToString` expression body definition.
34+
The following example defines a `Person` class that overrides the <xref:System.Object.ToString%2A> method with an expression body definition. It also defines a `DisplayName` method that displays a name to the console. Note that the `return` keyword is not used in the `ToString` expression body definition.
3535

3636
[!code-csharp[expression-bodied-methods](../../../../samples/snippets/csharp/programming-guide/classes-and-structs/expr-bodied-methods.cs)]
3737

0 commit comments

Comments
 (0)