I am wondering how can you do multi line strings without the concat sign(+)
I tried this
string a = String.Format(@"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
{0}xxxxxxx", "GGG");
string b = @"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
xxxxxxx";
string c = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
+ "xxxxxxx";
Console.WriteLine(a);
Console.WriteLine(b);
Console.WriteLine(c);
This works but the first 2 render alot of whitespace. Is there away to write multi lines without the concat sign and ignore end whitespace without using something like replace after the string is rendered?
Edit
using System; using
System.Collections.Generic; using
System.Linq; using System.Text;
namespace ConsoleApplication2 {
public class Test
{
public Test()
{
}
public void MyMethod()
{
string someLongString = "On top of an eager overhead weds a
pressed vat. How does a chance cage
the contract? The glance surprises the
radical wild.";
}
} }
Look how it goes right though my formating of the braces and is sticking out(sorry kinda hard to show on stack but it is sticking way to far out).
Sad thing is notepad++ does a better job and when it wraps it goes right under the variable.
