Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // hello skid i remade this so its a bit more light weight it might break more but idk and cba to test oof
- try
- {
- using (WebClient web = new WebClient()) // make new webclient
- {
- string weebs= web.DownloadString("link to pastebin version here"); // find the current version
- if (weebs == "1.0.0.0")
- {
- Console.WriteLine($"Current Version Found! : {weebs} : Latests Version!"); // inform client that they are up to date
- }
- else // if the number in the pastebin changes
- {
- Console.WriteLine("Attempting to get update!");
- web.DownloadFile("link to download", "file name"); // attempt to download
- //hopefully exception below will catch for this ^^
- }
- }
- }
- catch (Exception ex) //returns exceptions so the programme wont break
- {
- Console.WriteLine($"error(s) found: {ex.Message}");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement