0

I was sure that if I perform the AND operator on:

FontStyle fontStyle;
fontStyle = FontStyle.Bold & FontStyle.Italic

The resulting FontStyle will be Bold Italic, but to my surprise the resulting FontStyle was: FontStyle.Regular. Please explain the way to programmatically set the FontStyle to Bold Italic. I use the FontFamily: New Times Roman. Thank you.

DiplomacyNotWar
  • 31,605
  • 6
  • 57
  • 75
user2102327
  • 91
  • 2
  • 5
  • 16

1 Answers1

3

Use the OR operator to apply both.

fontstyle = FontStyle.Bold | FontStyle.Italic
HEWhoDoesn'tKnow
  • 347
  • 3
  • 14