enter image description here

Hello! Help me please. How to make the second part of the line in the CMD also be green?

  • Hello! Number the lines for us, please. What part of the line is the first, and which part is the second? - Igor
  • Sorry, did not correctly formulated the question. I meant lines CMD. The first hundred is green and the second should be green - Zjay
  • 2
    What is the problem? You have everything in the code - Anton Shchyrov

1 answer 1

Console.ForegroundColor = ConsoleColor.White; Console.Write("Ваш доход: = "); Console.ForegroundColor = ConsoleColor.DarkGreen; Console.WriteLine(debit); 
  • Thank you, Igor! Is it possible to do in one line? Set for example a variable, declare it a color and somehow use it? If so, I will be very happy if you explain - Zjay
  • @ user302914 No, if you need different colors on one line, you will have to output this line in parts. - Igor
  • OK thank you very much! - Zjay