Many time we need to programmatically retrieve the size of a file before downloading it from a web location or a network path. This is require to calculate the progress and/or the estimated time to download and display it to the user. For a local file it is easy, but to retrieve this information from a remote location, the implementation is little different.
Today in this small blog post, we will learn how to retrieve it dynamically using C# code. Continue reading to know about it. Code snippet has been shared in the post.