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.

適用対象