Skip to content

Commit f1170ba

Browse files
authored
Refactor the example (#50130)
1 parent cb9c433 commit f1170ba

File tree

1 file changed

+4
-1
lines changed
  • docs/csharp/programming-guide/classes-and-structs/snippets/constructors

1 file changed

+4
-1
lines changed

docs/csharp/programming-guide/classes-and-structs/snippets/constructors/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public class Adult : Person
2525
public Adult(string lastName, string firstName) : base(lastName, firstName)
2626
{ }
2727

28-
static Adult() => minimumAge = 18;
28+
static Adult()
29+
{
30+
minimumAge = 18;
31+
}
2932

3033
// Remaining implementation of Adult class.
3134
}

0 commit comments

Comments
 (0)