C# DateTimeOffset DayOfYear
Description
DateTimeOffset DayOfYear
gets the day of the year represented
by the current DateTimeOffset object.
Syntax
DateTimeOffset.DayOfYear
has the following syntax.
public int DayOfYear { get; }
Example
using System;// w ww .j a v a2 s . com
public class MainClass{
public static void Main(String[] argv){
DateTimeOffset startOfMonth = new DateTimeOffset(2014, 1, 1, 0, 0, 0,
DateTimeOffset.Now.Offset);
Console.WriteLine(startOfMonth.DayOfYear);
}
}
The code above generates the following result.