Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

how to make use of Service Reference generated in public interface in c#

$
0
0

I add a soap api as service reference in vs 2012.It'll auto-generate Reference.cs like below

namespace EnterpriseSoftware.abcWebService {

 public interface Some_Api{
     //list of generated method
} }

In order to make use of code from service reference.I think I have to create an instence of the class then call the methods.

I've try fews ways to create instence,but fail to do so....

I not used to calling methods of "public interface"

I try these,but fail. anyone help? Thank

EnterpriseSoftware.abcWebService.Some_api obj = new EnterpriseSoftware.abcWebService.Some_api();
using EnterpriseSoftware.abcWebService;

namespace EnterpriseSoftware{
public class comeclassName{
Some_api obj = new Some_api();
}
}


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>