2013-03-02 64 views
1

在我的窗户形式“System.ServiceModel.OperationContext”不包含在另一个项目中,我加入这一个构造函数“0”参数错误

private OperationContext op = new OperationContext(); 

其没有给出错误,但

的代码(同机,同.NET版本)线它给

“System.ServiceModel.OperationContext”不包含一个构造 该取“0”参数

错误任何一个可以帮助我吗?

+0

我知道这是一个愚蠢的问题,但在你的WinForms项目..是​​的OperationContext真正从System.ServiceModel的人吗?由于文档(http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontext.aspx)说,只有一个构造函数,它需要类型IContextChannel'的'参数。前往的OperationContext的定义在WinForm,看看导致仿佛它真的是从System.ServiceModel,然后我很惊讶它编译。 – Matt 2013-03-02 14:46:06

回答

0

那么也许有不同的OperationContext类?您完全符合条件的人只有一个constructor确实需要参数。

相关问题