+ 2
Painting console text
I was needed to write something in colors and found these codes but could not test on computer after a compile ; here in solo play ground it seems it is not working. is there a way to do that ? Console.BackgroundColor = ConsoleColor.Red; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("Hello World'); Console.ResetColor();
5 Réponses
+ 5
Code playground bypass standard console object and doesn't provide full functionalities like with access to the real console object... on desktop/laptop browsers it may works, as bypass not even work as expected (at least in FireFox console message are still displayed in real console instead of inside code playground layout... and line number indication are hard to locate because refering to the whole playground content instead of your embeded code :P)
+ 7
must be working.
SL can't change colors (I think because of standartized output view: grey, black), but code will run anyway
+ 4
You can send feedback to Sololearn for suggesting such things ;)
Use 'feedback' main menu option of app' or contact them through media listed here:
http://www.sololearn.com/Contact
+ 2
I don't think CodePlayground will allow color change on the Console.
I've tried it in Java before and had no luck.
+ 1
from the answers i figure out that we are limited in CPG.it would be nice to have at least color options in console for python/cpp/cs and java