pocorall.SCM_Notifier.MainForm.ReadFromWeb C# (CSharp) Метод

ReadFromWeb() приватный статический Метод

private static ReadFromWeb ( string url ) : string
url string
Результат string
        private static string ReadFromWeb(string url)
        {
            try
            {
                WebClient web = new WebClient();
                Stream s = web.OpenRead (url);
                string content = new StreamReader (s).ReadToEnd();

                if ((content.Length < 5) || (content.Length > 15))
                    return null;	// Bad content

                return content;
            }
            catch
            {
                return null;		// Problem with web connection
            }
        }
MainForm