SessionStateSection.Timeout 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
負責設定或設定會話暫停。
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年)。