using System.Globalization;
public static void Main()
Console.Write("Enter a two-letter culture code: ");
string cultureCode = Console.ReadLine();
CultureInfo culture = new CultureInfo(cultureCode);
string formattedDate = DateTime.Now.ToString("MMMM yyyy", culture);
Console.WriteLine("Formatted month name: {0}", formattedDate);
catch (CultureNotFoundException)
Console.WriteLine("Invalid culture code.");