假设这是一个ServiceContract
[ServiceContract]
public interface MyService
{
[OperationContract]
int Sum(int x, int y);
[OperationContract]
int Sum(double x, double y);
}
C#中允许方法重载,但是WCF不允许你重载operation contracts
宿主程序会抛出一个InvalidOperationException
while宿主