Get the day of the month represented by the current DateTimeOffset in CSharp
Description
The following code shows how to get the day of the month represented by the current DateTimeOffset.
Example
using System;// w ww.j a va 2s .co m
public class MainClass{
public static void Main(String[] argv){
DateTimeOffset theTime = new DateTimeOffset(2014, 5, 1, 16, 35, 0,
DateTimeOffset.Now.Offset);
Console.WriteLine("The day component of {0} is {1}.",
theTime, theTime.Day);
}
}
The code above generates the following result.