private static void CheckForUpdate() { UpdateTimer.Restart(); Client.GetAsync(uri).AsTask().ContinueWith((Task <HttpResponseMessage> response) => { IHttpContent responseContent = response.Result.Content; foreach (string str in Regex.Split(responseContent.ToString(), ",")) { if (str.Contains("\"tag_name\":")) { UpdateVersion = str.Replace("\"tag_name\":\"", "").Replace("\"", ""); if (ScreamAtUser && !UpdateAvailibleFlag) { if (str.Replace("\"tag_name\":\"", "").Replace("\"", "") != Version) { SendNotification("Update Available", UpdateVersion + " is published on github. Go there for the latest version"); } } UpdateAvailibleFlag = UpdateVersion != Version; } } }); }