Using (QualityControlClient bpClient=SoapClientFactory. CreateQualityControlServiceClient ())
CodePudding user response:
This code is equivalent to
Try
{
QualityControlClient bpClient=SoapClientFactory. CreateQualityControlServiceClient ();
.//using the code in the
}
The finally
{
BpClient. The Dispose ();
}
CodePudding user response:
Using the inside that is to instantiate an object
Use using resources is used up this object will be released
CodePudding user response:
reference 1st floor caozhy response: this code is equivalent to Try { QualityControlClient bpClient=SoapClientFactory. CreateQualityControlServiceClient (); .//using the code in the } The finally { BpClient. The Dispose (); } + 1 CodePudding user response:
refer to the second floor lazy lazy source reply: using the sentence is to instantiate an object inside the Use using resources is used up this object will be release Instantiate an object not to use the new? w CodePudding user response:
Private void BindListView () {using (QualityControlClient bpClient=SoapClientFactory. CreateQualityControlServiceClient ()) {selMods=bpClient. GetModelList_qc_Standard (the string. Format (" SysCode='{0}' and PWNO='{1}' and DelFlag=0 order by ShowIn ", enclosing ucSysBooks1. SysCode, enclosing ucSysWorkShop1. WorkShopCode)); If (selMods!=null) this. GridControl1. The DataSource=selMods; CodePudding user response:
The whole piece of code is that the small white is a bit don't understand CodePudding user response:
If you don't understand, you try to get rid of it, to see what effect, so that you can understand more, resource release do you know what do you mean? Should I don't know, know, you won't send this kind of problem CodePudding user response:
refer to 7th floor hands on the keyboard to knock very light response: if you don't understand, you try to get rid of it, to see what effect, so that you can understand more, resource release do you know what do you mean? Should I don't know, know, I wouldn't send this kind of problem Release resources know dalai, don't understand why write inside to create a customer service CodePudding user response:
refer to the eighth floor qq_45248209 response: Quote: refer to 7th floor hands on the keyboard to knock very light response: if you don't understand, you try to get rid of it, to see what effect, so that you can understand more, resource release do you know what do you mean? Should I don't know, know, I wouldn't send this kind of problem Release resources know dalai, don't understand why written inside to create a customer service write inside what is fine, just in order to omit release resources, again, do not understand, you can try, why [written] to create a customer service, you can create other things CodePudding user response:
Must be new, so long as the using is an object (obj) can also, but only achieved idisposed interface object can put in the using, should be in the final to invoke the dispose method, this is the interface definition CodePudding user response:
Not necessarily new, write wrong CodePudding user response:
Because, should not, mobile phone typing is not convenient, is a typo