static void Main(string[] args) { Console.WriteLine("-- Ask the Magic 8 Ball --\n"); using (Magic8BallClient ball = new Magic8BallClient()) { Console.Write("Your question: "); string question = Console.ReadLine(); string answer = ball.ObtainAnswerToQuestion(question); Console.WriteLine("8-Ball says: {0}", answer); } Console.ReadLine(); }
public MainWindow() { // Construct the client here but don't use it until after // the UI has finished rendering. _client = new Magic8BallClient("Magic8Ball"); }