DateTime.SpecifyKind Method

Windows Automotive 5.0/5.5
Creates a new DateTime object that represents the same time as the specified DateTime, but is designated in either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specified DateTimeKind value.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public static DateTime SpecifyKind (
         DateTime value,
         DateTimeKind kind


A DateTime object.
One of the DateTimeKind values.

Return Value

A new DateTime object consisting of the same time represented by the value parameter and the DateTimeKind value specified by the kind parameter.

Available in the .NET Micro Framework versions 3.0, 3.5, 4.0, and 4.1.

Community Additions