示例#1
0
 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();
 }
示例#2
0
        private void lblMessage_Click(object sender, EventArgs e)
        {
            if (host.State == CommunicationState.Faulted)
            {
                host = new MyHobbyClient();
            }

            lblResult.Text = host.MyHobby(txtBox.Text);
        }
示例#3
0
        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();
        }
示例#4
0
 public Form1()
 {
     InitializeComponent();
     host = new MyHobbyClient();
 }