title: Function Overloading in WCF
body: <p>I want to implement function overloading in WCF but i am not allowed to do so</p>
  
  <pre><code>    [OperationContract]
      [WebInvoke(Method = "GET",
      ResponseFormat = WebMessageFormat.Json)]
      branch_view[] GetBranches();
  
      [OperationContract]
      [WebInvoke(Method = "GET",
      ResponseFormat = WebMessageFormat.Json)]
      branch_view[] GetBranches(int pageNo , int pageSize);
  </code></pre>
  
  <p>The error i got is:</p>
  
  <p><em><strong>Cannot have two operations in the same contract with the same name, methods GetBranches and GetBranches in type QHRService.IEntityService violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute.</em></strong></p>
  
  <p>Why WCF does not allow Function overloading.</p>
  
  <p>I can change the name to get my function work but any reasons?</p>
  
  <p>Any help is appreciated </p>