Skip to content

Commit de590ba

Browse files
Johnny GérardBillWagner
authored andcommitted
Update expr-bodied-ctor.cs (#195)
Above the example, it is said: "The following example defines a Location class whose constructor has a single string parameter named name. The expression body definition assigns the argument to the Name property."
1 parent 5077fb8 commit de590ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snippets/csharp/programming-guide/classes-and-structs/expr-bodied-ctor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class Location
55
{
66
private string locationName;
77

8-
public Location(string name) => locationName = name;
8+
public Location(string name) => Name = name;
99

1010
public string Name
1111
{

0 commit comments

Comments
 (0)