System.Globalization.PersianCalendar.GetYear C# (CSharp) Method

GetYear() public method

public GetYear ( System.DateTime time ) : int
time System.DateTime
return int
        public override int GetYear(DateTime time) {
            return (GetDatePart(time.Ticks, DatePartYear));
        }

Usage Example

 public void PersianDate()
 {
     PersianCalendar pc = new PersianCalendar();
     DateTime dt = DateTime.Now;
     label17.Text = string.Format("امروز: {0}/{1}/{2}", pc.GetYear(dt), pc.GetMonth(dt), pc.GetDayOfMonth(dt));
 }
All Usage Examples Of System.Globalization.PersianCalendar::GetYear