AS a C# noob, how do I retry WebClient.DownloadString funtion
I am AN ABSOLUTE C# NOOB, so this is my very first project. I am write a C% command line program that I input a URL it downloads images from a gallery website I frequent. 99% of the the code I have written works. My only issue is sometimes my code, when trying to get the webpage source code, sometimes the download fails. 99% of what I am doing works. This 1% sometimes makes my program crash. I am trying to find a way to make WebClient.DownloadString will retry to download the page source if there is an error. With all that said above, 99% of the code is written, and working, so I will not rewrite it from the ground up in a different version of .net. (A suggestion I saw in a discord channel dedicated to C# coding that was not helpful in the least)
AS A C# ABSOLUTE NOOB, HOW DO I RETRY WebClient.DownloadString funtion
I am AN ABSOLUTE C# NOOB, so this is my very first project. I am write a C% command line program that I input a URL it downloads images from a gallery website I frequent. 99% of the the code I have written works. My only issue is sometimes my code, when trying to get the webpage source code, sometimes the download fails. 99% of what I am doing works. This 1% sometimes makes my program crash. I am trying to find a way to make WebClient.DownloadString will retry to download the page source if there is an error. With all that said above, 99% of the code is written, and working, so I will not rewrite it from the ground up in a different version of .net. (A suggestion I saw in a discord channel dedicated to C# coding that was not helpful in the least)