tags:

views:

143

answers:

2

please suggest any method to load am image from a web url which can work faster in a c# windows application other than webRequest class

+5  A: 

system.net.webclient

Of course, it's not really faster from a performance standpoint. If you're loading the image from the web, nothing will save you from having to send an http request to download it (you might try caching the image locally so at least you only need to download it once).

But it is faster in the sense of development time.

Joel Coehoorn
Webclient is just a wrapper around HttpWebRequest. http://my.safaribooksonline.com/9780596156688/httpwebrequest
ebpower
@ebpower: indeed. But that doesn't change that it's easier to use.
Joel Coehoorn
+1  A: 

If you're concerned about how long it takes to retrieve an image from the web, you could always cache it and update it in the background. It won't help the first time, but will make the app seem faster on subsequent loads.

Jon B