Skip to content

Commit b02d487

Browse files
CalvinAllenBillWagner
authored andcommitted
Update OldCode.cs (#501)
Added a tag name around the full Student class, along with adding the property and constructor initialization of 'Grades'
1 parent d779b5b commit b02d487

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

snippets/csharp/new-in-6/OldCode.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,23 @@ public string FullName
3030

3131
namespace ReadOnlyOldStyle
3232
{
33+
// <Student>
3334
public class Student
3435
{
3536
// <ClassicReadOnlyAutoProperty>
3637
public string FirstName { get; private set; }
3738
public string LastName { get; private set; }
39+
public ICollection<double> Grades { get; private set; }
3840
// </ClassicReadOnlyAutoProperty>
3941

4042
// <Construction>
4143
public Student(string firstName, string lastName)
4244
{
4345
FirstName = firstName;
4446
LastName = lastName;
47+
Grades = new List<double>();
4548
}
4649
// </Construction>
4750
}
48-
}
51+
// </Student>
52+
}

0 commit comments

Comments
 (0)