次の方法で共有


HttpClient.Timeout Property

Gets or sets the number of milliseconds to wait before the request times out.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

Syntax

'Declaration
Public Property Timeout As TimeSpan 
    Get 
    Set
'Usage
Dim instance As HttpClient 
Dim value As TimeSpan 

value = instance.Timeout

instance.Timeout = value
public TimeSpan Timeout { get; set; }
public:
property TimeSpan Timeout {
    TimeSpan get ();
    void set (TimeSpan value);
}
member Timeout : TimeSpan with get, set
function get Timeout () : TimeSpan 
function set Timeout (value : TimeSpan)

Property Value

Type: System.TimeSpan

Remarks

For a complete example of using the HttpClient class, see Calling a Web API From a .NET Client

See Also

Reference

HttpClient Class

System.Net.Http Namespace