C# DateTimeOffset ToFileTime
Description
DateTimeOffset ToFileTime
converts the value of the
current DateTimeOffset object to a Windows file time.
Syntax
DateTimeOffset.ToFileTime
has the following syntax.
public long ToFileTime()
Returns
DateTimeOffset.ToFileTime
method returns The value of the current DateTimeOffset object, expressed as a Windows file
time.
Example
//from w ww.j av a 2 s .c om
using System;
public class MainClass{
public static void Main(String[] argv){
DateTimeOffset originalTime, localTime;
originalTime = new DateTimeOffset(2014, 3, 11, 3, 0, 0,
new TimeSpan(-6, 0, 0));
Console.WriteLine(originalTime.ToFileTime());
}
}
The code above generates the following result.