C#中的多行字符串文字是否有一种在C#中创建多行字符串文本的简单方法?我现在拥有的是:string query = "SELECT foo, bar"+ " FROM table"+ " WHERE id = 42";我知道PHP<<<BLOCK
BLOCK;C#有类似的东西吗?
3 回答
九州编程
TA贡献1785条经验 获得超4个赞
// this would give a format exceptionstring.Format(@"<script> function test(x)
{ return x * {0} } </script>", aMagicValue)// this contrived example would workstring.Format(@"<script> function test(x)
{{ return x * {0} }} </script>", aMagicValue)- 3 回答
- 0 关注
- 3593 浏览
添加回答
举报
0/150
提交
取消
