diff --git a/MapleKeys.cs b/MapleKeys.cs index 80b18f6..b27e3a4 100644 --- a/MapleKeys.cs +++ b/MapleKeys.cs @@ -49,11 +49,11 @@ public static void Initialize() { if (File.Exists("noupdate.txt")) throw new Exception(); // Trigger offline file loading - HttpWebRequest req = WebRequest.Create("http://direct.craftnet.nl/app_updates/get_keys.php?source=SRK&version=4") as HttpWebRequest; + var req = WebRequest.Create("http://direct.craftnet.nl/app_updates/get_keys.php?source=SRK&version=4") as HttpWebRequest; req.Proxy = null; - using (HttpWebResponse response = req.GetResponse() as HttpWebResponse) - using (StreamReader sr = new StreamReader(response.GetResponseStream())) + using (var response = (HttpWebResponse)req.GetResponse()) + using (var sr = new StreamReader(response.GetResponseStream())) { string responseText = sr.ReadToEnd(); InitByContents(responseText);