title: How can i have two methods with same name in WCF?
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/10276124/why-you-cant-overload-a-method-in-wcf">why you cant overload a method in WCF?</a></p>
  </blockquote>
  
  <p>I am working on one project in which I use the WCF services. My problem is that in WCF service I am having one method named <code>Display()</code> which is used by me client1.</p>
  <p>Now I want to add another method with the same name but with one parameter, ie. <code>Display(string name)</code>, so that new clinet2 can use the new method and old client1 can use the old method. how can I achieve this? Here is the code which I have written.</p>
  <pre><code>namespace ContractVersioningService
  {
    [ServiceContract]
    public interface IService1 
    {
      [OperationContract]
      string Display();
  
      [OperationContract]
      string GoodNight();
    }     
  }
  
  namespace ContractVersioningService
  {
     public class Service1 : IService1
     {
       public string Display()
       {
          return &quot;Good Morning&quot;;          
       }
  
       public string GoodNight()
       {
          return &quot;Good Night&quot;;
       }
     }
  }    
  
  namespace ContractVersioningService
  {
    [ServiceContract(Namespace = &quot;ContractVersioningService/01&quot;, Name =      &quot;ServiceVersioning&quot;)]
    public interface IService2 : IService1
    {
       [OperationContract]
       string Disp(string greet);
    }
  }
  
  namespace ContractVersioningService
  {
   
     public class Service2 : Service1, IService2
     {
        public string Display(string name)
        {
           return name;
        }
  
        public string Disp(string s)
        {
           return s;
        }
     }
  }
  </code></pre>