It really bugs me when an application shows me a message like the one shown here. I’m willing to agree that, overall, it’s a minor issue - but the poor use of language really bugs me, and it makes me suspicious that maybe the rest of the application has had an equal lack of attention to detail.
Getting this kind of thing right isn’t difficult - it just takes a small amount of attention to detail.
Some useful extension methods can be helpful too … here’s one that I use frequently:
/// <summary>
/// Format an int value as a descriptive count string
/// </summary>
/// <param name="aValue">Value to format</param>
/// <param name="aSingular">Name for one item</param>
/// <param name="aPlural">Name for many items</param>
/// <returns>Formatted string</returns>
public static string ToCount(
this int aValue,
string aSingular,
string aPlural)
{
return string.Format(
"{0} {1}",
aValue,
aValue == 1 ? aSingular : aPlural);
}
Comments
blog comments powered by Disqus