Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 in C# \n suposed to be coloured?

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Jynks Posted - Dec 01 2018 : 7:53:39 PM
Console.WriteLine("This is a test\nShould this line break be coloured?\nAs it would be a lot easier to read");

So in the above code.. all the \n stuff are coloured the same as the string itself. I was wondering is that is working as intended or if there is something wrong? If not.. is there a way ot make these things coloured?
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 03 2018 : 2:40:53 PM
It makes sense that some editors do this, but no, it's not something that either VA or the IDE tries to do.
Jynks Posted - Dec 02 2018 : 8:33:55 PM
cool... yeah.. thanks I knew of that. Though you are right I am a beginner. I was just curious if it was supposed to be like that or if there was a error or something. As the / stuff was coloured in my last editing package is all.

Thanks for the reply.
feline Posted - Dec 02 2018 : 08:18:21 AM
This is working as intended. Once you start looking at more complex escape sequences, let alone regular expressions, this quickly becomes a bit tricky.

Are you aware of literal strings in C#? You can replace this line with the code:

    Console.WriteLine(@"This is a test
Should this line break be coloured?
As it would be a lot easier to read");

which makes it a lot easier to read and edit, and is still valid code.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000