Пример #1
0
 public static string Begin(this FontStyle fontStyle) {
     switch (fontStyle) {
         case FontStyle.Normal:
             return "";
         case FontStyle.Bold:
             return "<b>";
         case FontStyle.Italic:
             return "<i>";
         case FontStyle.BoldAndItalic:
             return "<b><i>";
         default:
             throw new InvalidEnumArgumentException(nameof(fontStyle), (int) fontStyle, fontStyle.GetType());
     }
 }