Show tick symbol on label

前端 未结 4 1066
鱼传尺愫
鱼传尺愫 2020-12-28 14:38

How can I show \"√\" (tick symbol) in label text?

4条回答
  •  梦谈多话
    2020-12-28 15:00

    This code will do it for you:

    LblTick.Text  = ((char)0x221A).ToString();
    

    Edit:

    or even easier:

    lblTick.Text = "\u221A";
    

    Edit 2:

    And, as pointed out in a comment, that code (221A) is actually a square root symbol, not a tick. To use the true tick mark, you can use the following:

    lblTick.Text = "\u2713";
    

    or for a heavy tick mark, you can use the following (but you may get font issues with this one):

    lblTick.Text = "\u2714";
    

    (Credit to @Joey for that comment!)

提交回复
热议问题