相关疑难解决方法(0)

C#中的多行字符串文字

有没有一种简单的方法在C#中创建多行字符串文字?

这就是我现在拥有的:

string query = "SELECT foo, bar"
+ " FROM table"
+ " WHERE id = 42";
Run Code Online (Sandbox Code Playgroud)

我知道PHP有

<<<BLOCK

BLOCK;
Run Code Online (Sandbox Code Playgroud)

C#有类似的东西吗?

c# string shorthand

962
推荐指数
12
解决办法
56万
查看次数

标签 统计

c# ×1

shorthand ×1

string ×1