static void Main(string[] args) { var host = new MyHobbyClient(); System.Console.WriteLine("My hobby is playing FIFA. Are you a FIFA or a PES fan?"); var hobby = System.Console.ReadLine(); System.Console.WriteLine(host.MyHobby(hobby)); System.Console.ReadLine(); }
private void lblMessage_Click(object sender, EventArgs e) { if (host.State == CommunicationState.Faulted) { host = new MyHobbyClient(); } lblResult.Text = host.MyHobby(txtBox.Text); }