I'm trying to make my app start with a splash form to check for app version update then I want to terminate the splash screen if there is no update available and start my Main Form, And if there is an update the app will open the update link and terminate itself.
I'm checking for update like this
WebClient client = new WebClient();
Stream stream = client.OpenRead("https://www.XXXXXXX");
StreamReader reader = new StreamReader(stream);
String content = reader.ReadToEnd();
Console.WriteLine(content);
if (content == "0.8")
{
// Correct Version, I want here to terminate the splash screen and start my main form
}
else
{
//Wrong version and needs an update, I want here to terminate the whole app.
}
I tried different things but nothing seems to work as I exactly want can someone suggest a good way to do this ?