如何在两行之间添加空间 [英] How to add space between two lines

查看:254
本文介绍了如何在两行之间添加空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

infoMessage.Text + = pair.Key;

infoMessage.Text + = item.Tostring();


上面的代码有两个不同的用途.但是最后,他们俩都有责任在同一面板(网络上)中显示其消息.它们在另一个之后显示rght,没有任何空格,例如一个大的一行字符串.我想在两者之间留一个空间.

infoMessage.Text += pair.Key;

infoMessage.Text+= item.Tostring();


The above codes are used in two different purposes. but finally they both are responible for displaying their messages in the same panel (on web). they display rght after the other one without any space like a big one line string. I want to do a space in between . what code and where do i add it to do that.

推荐答案

infoMessage.Text = string.Format("{0}\r\n{1}", pair.Key, item.ToString());


这篇关于如何在两行之间添加空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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