CSNet40AsyncSample.Program.ExecuteAsyncMethod C# (CSharp) Method

ExecuteAsyncMethod() private static method

private static ExecuteAsyncMethod ( ) : void
return void
        private async static void ExecuteAsyncMethod()
        {
            var fb = new FacebookClient();

            try
            {
                dynamic result = await fb.GetTaskAsync("/4");

                Console.WriteLine("Name: {0}", result.name);
            }
            catch (FacebookApiException ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
    }