日期:2014-05-17  浏览次数:20899 次

菜鸟的Font问题!关于"|"号.

private Font Var_Font = new Font("宋体", 9,FontStyle.Italic); 
((Label)sender).Font = new Font(Var_Font, Var_Font.Style | FontStyle.Underline);


这里的"|"线是什么意思哈?
或者?
怎么感觉怪怪的...
我调试的时候,总是发现Var_Font.Style 的值是 Regular, Var_Font.Style | FontStyle.Underline的值为Underline...何解?

------解决方案--------------------
就是给字体添加下划线吧。
------解决方案--------------------
Var_Font.Style 
------解决方案--------------------
 FontStyle.Underline 等同于
我要 Style 同时也要 UnderLine 
好比   1,2,4,8,16
我要4与8    12= 4
------解决方案--------------------
8
 
------解决方案--------------------
c# 标志枚举