C#-এ কনসোল টেক্সটের ফোরগ্রাউন্ড (লেখার) কালার পরিবর্তন করতে Console.ForegroundColor প্রোপার্টি ব্যবহার করা হয়।
উদাহরণ
using System;
class Demo {
public static void Main (string[] args) {
Console.BackgroundColor = ConsoleColor.Blue;
Console.WriteLine("Background color changed = " + Console.BackgroundColor);
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("\nForeground color changed = " + Console.ForegroundColor);
}
}
আউটপুট
আউটপুট একটি ইমেজ হিসেবে প্রদর্শিত হয়েছে।
