Click here to Skip to main content
12,953,479 members (51,443 online)
Click here to Skip to main content
Alternatives (1)
Add your own
alternative version

Tagged as


5 bookmarked
Posted 9 Jun 2011

Ordinal suffixes in English for the nth degree

, 13 Jun 2011 CPOL
A short C# method to put the Grammarians in a Good Humor


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

14 Jun 2011
What aboutpublic static string NUMthOF(UInt32 v){ return v.ToString() + // Append the ordinal suffix for the unit digit // unless the ten digit is a one (force 'th') "thstndrdthththththth".Substring(2 * (int)(v / 10 % 10 != 1 ? v % 10 : 0), 2);}?Now all...


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United States United States
Writer, designer, inventor, musician, observer, and critic with many years of experience in each of these areas. I can do without the approval of "experts" because I believe candid statements and penetrating analysis bring greater rewards than a "pat on the back". And if I have something to say when you're not listening, I tell someone else about it.

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.170525.1 | Last Updated 14 Jun 2011
Article Copyright 2011 by GAMerritt
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid