We have the code:
Console.Write ("Что то"); I need that “What” be green and “that” red. Yes, it can be divided.
Console.ForegroundColoe = ConsoleColor.Green; Console.Write ("Что"); Console.ForegroundColor = ConsoleColor.Red; Console.Write ("то"); But I would like to change the color of the console "in the middle" of output to the console. What is it for? Depending on the condition, we need to output some values to the console again. For example, (red) 1 (green) 23, (green) 1 (red) 2 (green) 3, (green) 12 (red) 3. If they were needed in the same color, then everything is simple:
Console.Write(new string ('123', колвораз)); And so ... Yes, you can create several if, and ... (Example)
int writecount = 0; if(чтото = чтото) { do { Console.ForegroundColor = ConsoleColor.Red Console.Write("1"); Console.Fore... ++writecount; }while(writecount != чтото); But my application is not the easiest, and a great repetition of do (and I have big numbers there) just hangs the console tightly. How can I insert a color into the output? Or tell me another solution to this problem, preferably as resource-consuming as possible.

