RequestCachePolicy::ToString Method ()
.NET Framework (current version)
Returns a string representation of this instance.
Assembly: System (in System.dll)
The following code example creates a NoCacheNoStore policy and sends a request.
static WebResponse^ GetResponseFromServer( Uri^ uri ) { RequestCachePolicy^ policy = gcnew RequestCachePolicy( RequestCacheLevel::NoCacheNoStore ); WebRequest^ request = WebRequest::Create( uri ); request->CachePolicy = policy; WebResponse^ response = request->GetResponse(); Console::WriteLine( L"Policy is {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: