DateTimeWithZone Constructor (DateTime, TimeSpan?)DateTimeWithZone Constructor (Date, Nullable(Of TimeSpan))DateTimeWithZone Constructor (DateTime, Nullable<TimeSpan>)

Initializes a new instance of the DateTimeWithZoneDateTimeWithZoneDateTimeWithZone structure from the specified DateTimeDateDateTime and TimeSpanTimeSpanTimeSpan time zone.

Syntax

Public Sub New ( _
    dateTime As Date, _
    timeZone As Nullable(Of TimeSpan) _
)
public DateTimeWithZone(
    DateTime dateTime,
    Nullable<TimeSpan> timeZone
)
public:
DateTimeWithZone(
    DateTime dateTime, 
    Nullable<TimeSpan> timeZone
)
 

Parameters

dateTime

Type: System.DateTimeSystem.DateTimeSystem::DateTime

The date and time.

timeZone

Type: System.Nullable<T>System.Nullable(Of T)System::Nullable<T>

The time zone (can be null a null reference (Nothing in Visual Basic) nullptr).