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
Next Post
Want to get more done, faster?  30 May 2009
Prior Post
Is CruiseControl.NET worth the effort?  24 May 2009
Related Posts
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
A bash puzzle, solved  02 Jul 2022
A bash puzzle  25 Jun 2022
Improve your troubleshooting by aggregating errors  11 Jun 2022
Improve your troubleshooting by wrapping errors  28 May 2022
Keep your promises  14 May 2022
When are you done?  18 Apr 2022
Fixing GitHub Authentication  28 Nov 2021
Archives
May 2009
2009