HttpRequestCachePolicy::ToString Method ()
.NET Framework (current version)
Returns a string representation of this instance.
Assembly: System (in System.dll)
The string contains a label that identifies the property, followed by a colon (":") and the value. Properties are separated by a single space.
The following code example demonstrates calling this method.
static WebResponse^ GetResponseUsingDefaultCache( Uri^ uri ) { // Set a cache policy level for the "http:" scheme. HttpRequestCachePolicy^ policy = gcnew HttpRequestCachePolicy( HttpRequestCacheLevel::Default ); // Create the request. WebRequest^ request = WebRequest::Create( uri ); request->CachePolicy = policy; WebResponse^ response = request->GetResponse(); Console::WriteLine( L"Policy {0}.", policy ); Console::WriteLine( L"Is the response from the cache? {0}", response->IsFromCache ); return response; }
.NET Framework
Available since 2.0
Available since 2.0
Show: