From 88a6aef69dd5fc8d39cc1dd8cbe13fa9368ea19d Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 15 May 2019 16:25:38 -0400 Subject: [PATCH] Remove set accessors from the view model The view model can be immutable. This matches the text description (and the intent). --- .../SimpleFeedReader/ViewModels/NewsStoryViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs b/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs index 7ae5738c756..f11a3e9f3fe 100644 --- a/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs +++ b/csharp/tutorials/nullable-reference-migration/finished/SimpleFeedReader/ViewModels/NewsStoryViewModel.cs @@ -9,9 +9,9 @@ public class NewsStoryViewModel public NewsStoryViewModel(DateTimeOffset published, string title, string uri) => (Published, Title, Uri) = (published, title, uri); - public DateTimeOffset Published { get; set; } - public string Title { get; set; } - public string Uri { get; set; } + public DateTimeOffset Published { get; } + public string Title { get; } + public string Uri { get; } } #nullable restore //