Skip to content

Instantly share code, notes, and snippets.

View bassuny3003's full-sized avatar
😀
Working In ShutUp Long Link Application

Mohamed Bassuny bassuny3003

😀
Working In ShutUp Long Link Application
View GitHub Profile
@bassuny3003
bassuny3003 / Download File Using C#
Created April 6, 2023 12:36
Download File Using C#
private void DownloadFile(string urlAddress, string location)
{
using (WebClient client = new WebClient())
{
Uri uri = new Uri(urlAddress);
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
client.DownloadFileAsync(uri, location);
}
}
@bassuny3003
bassuny3003 / GithubUpdateChecker.cs
Last active April 6, 2023 00:30
Using Github API to get Last Release And Check If The There Is New Version
using Newtonsoft.Json; //NuGet Newtonsoft.Json
using RestSharp; //NuGet RestSharp
using System;
using System.Collections.Generic;
using System.Net;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace [ YOUR PROJECT NAMESPACE ]