how to get min month and max in c# code example Example: c# get month number string sMonth = DateTime.Now.ToString("MM");