Appointment.Duration 속성

정의

약속의 기간을 나타내는 시간 범위를 가져오거나 설정합니다. 기간은 TimeSpan 형식이며 음수가 아니어야 합니다.

public:
 property TimeSpan Duration { TimeSpan get(); void set(TimeSpan value); };
TimeSpan Duration();

void Duration(TimeSpan value);
public System.TimeSpan Duration { get; set; }
var timeSpan = appointment.duration;
appointment.duration = timeSpan;
Public Property Duration As TimeSpan

속성 값

약속 기간을 나타내는 시간 범위입니다. 기간은 음수 값이 될 수 없습니다.

Windows 요구 사항

앱 기능
appointmentsSystem

설명

이 속성은 프로그래밍할 언어에 따라 다르게 표시되는 시간 범위 값을 사용합니다.

  • JavaScript에서 기간 값을 시간 간격을 나타내는 숫자 로 설정합니다. TimeSpan 값의 각 단위는 1밀리초를 나타냅니다. 예를 들어 이 코드는 Duration 값을 60분(1시간)으로 설정합니다. '''javascript appointment.duration = (60 * 60 * 1000); 1밀리초 단위로 1시간


+ In Visual C++ component extensions (C++/CX), use a <xref:Windows.Foundation.TimeSpan?text=TimeSpan> structure value with a **Duration** value. In Visual C++ component extensions (C++/CX), each unit for a **Duration** value represents 100 nanoseconds.
+ In C# or Microsoft Visual Basic, you use a [System.TimeSpan](/dotnet/api/system.timespan?view=dotnet-uwp-10.0&preserve-view=true) value. You can use utility API of [System.TimeSpan](/dotnet/api/system.timespan?view=dotnet-uwp-10.0&preserve-view=true) such as [FromSeconds](/dotnet/api/system.timespan.fromseconds?view=dotnet-uwp-10.0&preserve-view=true) to generate a [System.TimeSpan](/dotnet/api/system.timespan?view=dotnet-uwp-10.0&preserve-view=true) and set the value.




> [!NOTE]
> In JavaScript, <xref:Windows.Foundation.TimeSpan?text=TimeSpan> is accessed as a value, not as an object. For example, use `var a = 10000`, not `var a = { duration: 10000 }`. Also, in JavaScript, <xref:Windows.Foundation.TimeSpan?text=TimeSpan> is treated as the number of millisecond intervals, not the number of 100-nanosecond intervals so you can lose precision when you port <xref:Windows.Foundation.TimeSpan?text=TimeSpan> values between languages.

적용 대상