CSharp examples for System:DateTime Year
The total years.
// Copyright by the Spark Development Network using System;// w w w . j a v a2s . co m public class Main{ /// <summary> /// The total years. /// </summary> /// <param name="start">The start.</param> /// <param name="end">The end.</param> /// <returns></returns> public static int TotalYears( this DateTime end, DateTime start ) { return ( end.Year ) - ( start.Year ); } }