|
This is an age old problem and one that’s probably been solved countless times before, but I’m going to write about it anyways. Say you’re writing code like this: < p > You have the following themes: </ p > < ul > @ foreach(var theme in Model) { < li > @ theme.Id </ li > } </ ul > The natural inclination for the lazy developer is to leave enough alone and stop there. It’s good enough, right? Right? Sure, when the value of Model.Count is zero or larger than one. But when it is exactly one, the phrase is incorrect English as it should be singular “You have the following theme”. I must fight my natural inclination here! On the NuGet team, we have a rallying cry intended to inspire us to strive for better, “Apple...
|