Revision Updater
I want to make a method that will check the server's revision, check the "website" for a revision higher than it, then change the s开发者_JAVA技巧erver's revision.
Here's what I've gotten so far.
/// <summary>
/// Update the Emulator's Revision!
/// </summary>
private static void Update()
{
int pause = 900;
Console.WriteLine("Checking your revision");
Thread.Sleep(pause);
Console.WriteLine("------->" + Revision);
Console.WriteLine("Checking Checking the newest revision online");
Thread.Sleep(pause);
//string Test = "Anything" > Revision;
string Website = new WebClient().DownloadString("http://whatever.com/revision.php/");
//if (Website.Contains(Test))
//{
//}
}
Is there a way to find anything that is over "Revision" on "website"?
If I understand you correctly you simply want to check a "revision string" if it is higher than what you got locally.
As I see it, it depends on what you use as a revision. If it looks something like "1.0.0.1" (major, minor, built and so on) I would break the string apart with the Split method and convert it into integers, then compare each part separately.
I'm not aware that a simple "revision-compare"-method exists.
精彩评论