本文介绍了WCF方法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的代码中出现以下错误:

Hi,

I am getting following error in my code:



代码



Code

public  retour ConsultationClientWCF( ref int ID_CLIENT)
  {
      Service1 ser = new Service1();
      ser.ConsultationClient(ID_CLIENT);

      if ( ser.ConsultationClient(ID_CLIENT).Equals(0)){
          retour rt = new retour();
          rt.succes = 0;
          rt.msgsucces = "opération réeussite";
          return rt;
      }

      else if (ser.ConsultationClient(ID_CLIENT).Equals(-1)){
          retour ht = new retour();
          ht.echec = -1;
          ht.msgechec = "Operation échoué";
        return ht;
      }
  }



请帮我:( :( :(:(



Pease help me :( :( :( :(

推荐答案

if ( ser.ConsultationClient(ID_CLIENT).Equals(0)){
retour rt = new retour(); 
rt.succes = 0;
rt.msgsucces = "opération réeussite";
return rt; 
}

else if (ser.ConsultationClient(ID_CLIENT).Equals(-1)){ 
retour ht = new retour();
ht.echec = -1;
ht.msgechec = "Operation échoué";
return ht; 
}
else
{
return null;//or some other value here;
}


这篇关于WCF方法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 22:55