假设这是一个 ServiceContract
[ServiceContract]
public interface MyService
{
[OperationContract]
int Sum(int x, int y);
[OperationContract]
int Sum(double x, double y);
}
C#中允许方法重载,但是WCF不允许您重载operation contracts
托管程序将InvalidOperationException
在托管时抛出