Share via


DateTime.SpecifyKind Method

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)

Syntax

public static DateTime SpecifyKind (
         DateTimevalue,
         DateTimeKindkind
)

Parameters

  • value
    A DateTime object.
  • kind
    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.

Version Information

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

See Also

Reference

DateTime Structure
DateTime Members
System Namespace