显示标签文字

问题描述:

我有一个标签.label文本属性包含"E&O.E"文本
但是当运行我的Windows页面时,它看起来. EO.E
但我想显示实际数据.

i have a label .label text property contain "E&O.E" text
but when run my windows page then it look. EO.E
but i want to show actual data.

hiii,

将标签文本键入为"E && O.E"
hiii,

type label text as "E&&O.E"


HI,

用另一个&"号将其转义.



Escape it with another ampersand (&&).

private void button1_Click(object sender, EventArgs e)
       {
           label1.Text = "E&&O.E";
       }






谢谢!!!






Thanks!!!


尝试:
private void button1_Click(object sender, EventArgs e)
{
     label1.Text = @"E&O.E";
}




OR

private void button1_Click(object sender, EventArgs e)
{
     label1.Text = "E&O.E";
}