[英]Translating VB.NET Method Call to C#
I can't seem to figure how to properly convert the following VB.NET code into C#, where I will be declaring a web service object and then ultimately using a function to return the data I need. 我似乎无法弄清楚如何正确地将以下VB.NET代码转换为C#,在此我将声明一个Web服务对象,然后最终使用一个函数返回所需的数据。 I have the webservice created in my project: http://mmm-acctgdev.abc.com/Central_Locating/Service/Locating.asmx 我在项目中创建了Web服务: http : //mmm-acctgdev.abc.com/Central_Locating/Service/Locating.asmx
VB.NET web service declaration: VB.NET Web服务声明:
Dim oFind As New com.abc.mmm_acctgdev.Locating
//*Need to convert this into something a C# form can use
VB function call : VB函数调用:
retXML = oFind.GetLocationByNum(txtFNum.Text)
//*need this call in c#
var oFind = new com.abc.mmm_acctgdev.Locating();
var retXML = oFind.GetLocationByNum(txtFNum.Text);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.