如何在C#标签中显示()? [英] How can i display ( ) in a C# label?

查看:118
本文介绍了如何在C#标签中显示()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C#标签中显示短语 day(s),但
(s)
会导致整个单词留下超出标签。建议?我有

I want to display the phrase day(s) in a C# label but the (s) causes the entire word to be left out of the label. Suggestions? I have

lblLodgingCost.Text = lodgingCost.ToString(" c2")+"对于  " + numOfDays.ToString()+" day(s)" ;; $

lblLodgingCost.Text = lodgingCost.ToString("c2") + " for  " + numOfDays.ToString() + " day(s)";

推荐答案

在表单设计器中编辑lblLodgingCost并稍微增加其长度。或者将Autosize属性设置为true。
Edit lblLodgingCost in the form designer and increase its length a little bit. Or set the Autosize property to true.


这篇关于如何在C#标签中显示()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆