Instead of displaying x item(s) found

from today on we use the following code

Console.WriteLine("{0} item{1} found.", count, count==1 ? "" : "s");

and get a nice output like

201 items found 

instead of

201 item(s) found 


From stackoverflow


Peter Gfader said...

For easier globalization I would rather use:

Console.WriteLine("{0} {1} found.", cound, count==1 ? "item" : "items");

Unknown said...


Post a Comment

Latest Posts

Popular Posts