If I pass a local file URI as a parameter to System.Net.WebClient.DownloadData(string uri), it returns the content correctly but does not close the file afterwards.
var webclient = new System.Net.WebClient();
string uri = "file:///tmp/foo";
byte  fooContent = webclient.DownloadData(url);
After running this, fooContent contains the data from /tmp/foo, but that file remains opened (in consequence causing an IOException if you want to write to it)