Pleuralise

 public static string PleuraliseByAddingS(this string input, int number)
        {
            if (!String.IsNullOrEmpty(input))
            {
                if (number == 1) return input;

                return string.Format("{0}s", input);
            }
            else
            {
                return null;
            }

        }
Example:
There are PleuraliseByAddingS("record",10) will add an 's' onto record.

Description

A simple method that adds 's' onto words. used when you return x record(s)

Details

Double click on the code to select all.

 

;