共用方式為


SessionStateSection.Timeout 屬性

定義

負責設定或設定會話暫停。

public:
 property TimeSpan Timeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))]
[System.Configuration.ConfigurationProperty("timeout", DefaultValue="00:20:00")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:01:00")]
public TimeSpan Timeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))>]
[<System.Configuration.ConfigurationProperty("timeout", DefaultValue="00:20:00")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:01:00")>]
member this.Timeout : TimeSpan with get, set
Public Property Timeout As TimeSpan

屬性值

遊戲暫停時間,幾分鐘內。 預設值是20分鐘。

屬性

範例

以下程式碼範例示範如何取得該 Timeout 財產。 參考課程主題中的 SessionStateSection 程式碼範例,學習如何存取該 SessionStateSection 物件。

// Display the current Timeout property value.
Console.WriteLine("Timeout: {0}",
  sessionStateSection.Timeout);
' Display the current Timeout property value.
Console.WriteLine("Timeout: {0}", sessionStateSection.Timeout)

備註

Timeout該資產的價值不得超過525,601分鐘(1年)。

適用於