BL_pundt.WebSite.LoadContent C# (CSharp) Метод

LoadContent() приватный Метод

private LoadContent ( ) : string
Результат string
        private string LoadContent()
        {
            Debug.WriteLine("LoadContent");
            Debug.Indent();

            string content = string.Empty;
            if (!string.IsNullOrEmpty(url))
            {
                try
                {
                    WebClient client = new WebClient();
                    content = client.DownloadString(url);
                    Debug.WriteLine("Success");
                }
                catch (Exception ex)
                {
                    Debug.WriteLine("Error");
                    Debug.WriteLine(ex.Message);
                }
            }
            else
            {
                throw new Exception("Please provide a valid URL");
            }
            Debug.Unindent();
            return content;
        }