在.net(c#)中,字符串过长,浏览起来不方便,可以用这种方式处理,分多行书写:
例如:string a = @"this is a case for string
look at here";
字符串前加一个@就可以啦!
例如:string a = @"this is a case for string
look at here";
字符串前加一个@就可以啦!
本文介绍了一种在 .NET(C#) 中处理长字符串的方法,通过使用 @ 符号可以方便地将字符串分多行书写,提高代码的可读性。
2644