System.Net.HttpWebRequest.HttpWebRequest.EndGetRequestStream C# (CSharp) Method

EndGetRequestStream() public method

public EndGetRequestStream ( IAsyncResult asyncResult ) : Stream
asyncResult IAsyncResult
return Stream
		public override Stream EndGetRequestStream (IAsyncResult asyncResult)
		{
			if (asyncResult == null)
				throw new ArgumentNullException ("asyncResult");

			WebAsyncResult result = asyncResult as WebAsyncResult;
			if (result == null)
				throw new ArgumentException ("Invalid IAsyncResult");

			asyncWrite = result;
			result.WaitUntilComplete ();

			Exception e = result.Exception;
			if (e != null)
				throw e;

			return result.WriteStream;
		}