コード例 #1
0
        /// <summary>
        /// Prepends the formatting.
        /// </summary>
        /// <param name="option">The option.</param>
        /// <param name="relativeOrder">The relative order.</param>
        /// <returns>A prepending string for the prefixing option.</returns>
        public static string PrependFormatting(ElementFormatOption option, int relativeOrder)
        {
            switch (option)
            {
            case ElementFormatOption.Numbered:
                return(relativeOrder + ". ");

            case ElementFormatOption.Lettered:
                return(ConvertNumberToCharacter(relativeOrder) + ". ");

            case ElementFormatOption.Roman:
                return(ConvertNumberToRomanNumeral(relativeOrder) + ". ");

            default:
                return(string.Empty);
            }
        }
コード例 #2
0
ファイル: Utility.cs プロジェクト: krishna23456/Engage-Survey
 /// <summary>
 /// Prepends the formatting.
 /// </summary>
 /// <param name="option">The option.</param>
 /// <param name="relativeOrder">The relative order.</param>
 /// <returns>A prepending string for the prefixing option.</returns>
 public static string PrependFormatting(ElementFormatOption option, int relativeOrder)
 {
     switch (option)
     {
         case ElementFormatOption.Numbered:
             return relativeOrder + ". ";
         case ElementFormatOption.Lettered:
             return ConvertNumberToCharacter(relativeOrder) + ". ";
         case ElementFormatOption.Roman:
             return ConvertNumberToRomanNumeral(relativeOrder) + ". ";
         default:
             return string.Empty;
     }
 }