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

问题描述

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());


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

06-16 05:19