label1 属性连接 label2 属性 [英] label1 property join label2 property
本文介绍了label1 属性连接 label2 属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能否将label1
text&property 和label2
text&property 合二为一并在label3
中显示并添加文本=代码> ?因为我现在使用的是并排使用
label1
和 label2
.
Can label1
text&property and label2
text&property become one and display it in label3
and added text =
? because what I am using now is using label1
and label2
putting side by side.
告诉我是否有其他方法
Ps:我在数据库中定义颜色,如 red
或 blue
.
Ps: I define the color in a database like red
or blue
.
推荐答案
使用 string.format 将 2 个标签文本组合在一起.
Use string.format to combine the 2 labels texts together.
label3.Text = string.Format("{0}={1}", label1.Text, label2.Text);
这篇关于label1 属性连接 label2 属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文