c# .net

How to convert bytes to stream using asp.net c#?

How to convert bytes to stream using asp.net c#?, someone asked me to explain?

In this article you will learn about how to convert url to stream using Asp.NET C#.

using System.Net;

using System.IO;

 

private Stream urltostream(string url)

    {

        WebClient wc = new WebClient();

        byte[] bytes = wc.DownloadData(url);

        Stream stream = new System.IO.MemoryStream(bytes);

        return stream;

 


    }

Post your comments / questions