Esempio n. 1
0
        static void Main(string[] args)
        {
            WebServiceClient Client = new WebServiceClient();

            Console.WriteLine(Client.Factorial(3));
            Client.Close();
        }
Esempio n. 2
0
 public void Close()
 {
     lock (_clientLock)
     {
         if (_client != null)
         {
             try
             {
                 if (_client.State == CommunicationState.Opened)
                 {
                     _client.Close();
                 }
                 _client.Abort();
             }
             catch
             {
                 // Ignore errors on disconnect
             }
         }
     }
 }