C#给文字换行的小技巧
作者:junjie 时间:2023-07-01 07:38:00
刚刚看MSDN的一个例子无意发现的小技巧,大家一看就明白了,不过好像蛮有用的,先记下咯,以后慢慢研究。
using System;
namespace NewLine
{
class Test
{
static void Main()
{
string s1 = "白日依山尽";
string s2 = "黄河入海流";
string s3 = "欲穷千里目";
string s4 = "更上一层楼";
Console.WriteLine("{0}{1}{0}{2}{0}{3}{0}{4}",Environment.NewLine,s1,s2,s3,s4);
Console.ReadKey();
}
}
}
标签:C#,换行,小技巧
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
springboot项目如何设置session的过期时间
2022-12-31 23:45:27
![](https://img.aspxhome.com/file/2023/9/102649_0s.png)
Java之BigDecimal的坑及解决
2022-05-17 01:09:01
Java并发之ReentrantLock类源码解析
2022-08-09 18:10:35
![](https://img.aspxhome.com/file/2023/5/69695_0s.jpg)
云IDE:Eclipse Che:Eclipse下一代IDE(推荐)
2023-04-01 05:58:27
![](https://img.aspxhome.com/file/2023/7/112047_0s.jpg)
Android开发 OpenGL ES绘制3D 图形实例详解
2023-01-12 00:06:09
![](https://img.aspxhome.com/file/2023/0/91710_0s.png)
Http学习之组装报文
2021-12-30 07:23:18
![](https://img.aspxhome.com/file/2023/7/131987_0s.png)
详解Android XML中引用自定义内部类view的四个why
2023-06-01 19:40:41
java 读取系统Properties代码实例
2023-02-22 04:21:52
Spring boot整合mybatis实现过程图解
2023-01-15 09:31:05
![](https://img.aspxhome.com/file/2023/0/78880_0s.png)
Android Flutter实现五种酷炫文字动画效果详解
2023-06-27 02:57:16
![](https://img.aspxhome.com/file/2023/6/117126_0s.gif)
Java使用application.property读取文件里面的值
2023-11-01 07:24:56
如何用java实现分页查询
2023-09-23 06:50:24
java封装及四种权限修饰符详解
2023-03-20 20:18:38
![](https://img.aspxhome.com/file/2023/6/132086_0s.png)
Android以对话框形式制作数字软键盘示例
2022-12-07 07:37:03
![](https://img.aspxhome.com/file/2023/4/138664_0s.gif)
Java项目开发命名规范(动力节点Java学院整理)
2021-06-24 07:16:56
使用mutex实现应用程序单实例运行代码分享
2023-09-18 22:45:11
Android实现QQ图片说说照片选择效果
2022-05-15 12:52:08
![](https://img.aspxhome.com/file/2023/8/138788_0s.jpg)
OpenCV计算图像的水平和垂直积分投影
2021-10-09 08:40:45
![](https://img.aspxhome.com/file/2023/1/124171_0s.jpg)
SpringBoot 2.x 整合Lombok的方法示例
2022-03-15 17:43:35
![](https://img.aspxhome.com/file/2023/2/88222_0s.jpg)
c#处理3种json数据的实例
2023-06-23 19:12:47