AspNetIntro2016.Models.CalendarFetcher.GetJsonString C# (CSharp) Метод

GetJsonString() публичный Метод

public GetJsonString ( ) : String
Результат String
        public String GetJsonString()
        {
            var jsonData = String.Empty;

            using (WebClient wc = new WebClient())
            {
                try
                {
                    jsonData = wc.DownloadString(Link);
                }
                catch (Exception e) //needs to capture a more precise exception
                {
                    System.Console.WriteLine("JSON problems");
                    System.Console.WriteLine(e.StackTrace);
                    System.Console.ReadKey();
                }
            }
            Console.WriteLine(jsonData);
            return jsonData;
        }