I want to define a long string and use it as a parameter in a helper class.
I have the following code that does not compile
@{
var code ="
new TEL_Helper
{
URI = "abc@domain.com",
Type = TEL_TelecomType.Email,
Use = TEL_TelecomUse.VacationHome
}"
Html.SyntaxXML(code)
}
How to define a line that spans multiple lines and has line breaks.
and solution used:
@{
var code =@"
new TEL_Helper
{
URI = 'abc@domain.com',
Type = TEL_TelecomType.Email,
Use = TEL_TelecomUse.VacationHome
}";
Html.SyntaxXML(code);
}
source
share