using System.Globalization;
using System.Text.RegularExpressions;
public static class Program
public static void Main()
Console.WriteLine("Hello World");
var pc = new PersianCalendar();
var current = DateTime.Now;
var currentMonth = pc.GetMonth(current);
var currentYear = pc.GetYear(current);
Console.WriteLine(currentYear);
Console.WriteLine(currentMonth);
var strInput = FixPersianChars("•علی• •احمدی•");
Console.WriteLine(strInput);
var regex = new Regex(@"^(?!.*[(@#!%$&*\(\)\<\>\|)])[A-Za-z\s\u0600-\u06FF\s\u0621-\u064A0-9_\.\-]+$");
Console.WriteLine(regex.IsMatch(strInput));
public static string FixPersianChars(this string str)
return str.Replace("ﮎ", "ک")