Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以我的形式
private OperationContext operationContext; operationContext = new OperationContext();
当我调试代码时,它显示错误
“System.ServiceModel.OperationContext”不包含采用“0”参数的构造函数
但是在我的朋友形式中,它可以在没有任何参数的情况下正常工作 operationContext = new OperationContext();
也许朋友使用不同版本的 .net 框架。你应该看到:
http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext.operationcontext%28v=vs.110%29.aspx