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
http://stackoverflow.com/questions/9033/hidden-features-of-c/821718#821718

Latest Posts

Popular Posts