Saving image to local folder from a stream reader

I am using following code to get image response :

HttpWebRequest request = (HttpWebRequest)result.AsyncState;

            HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);

            using (StreamReader streamReader = new StreamReader(response.GetResponseStream()))
                var serviceResponse = streamReader.ReadToEnd();

When I view the serviceResponse in debugging it comes back as "????"(Question marks in triangles)

Now how can I save this response as a image in a local folder. Code snippet would be useful


Sign In or Register to comment.