更新时间:2022-06-02 21:41:33
我的想法是,您可以创建一个类
来管理3个Web服务。然后使用添加/服务参考添加您的Web服务,然后在新的类
中添加您可以创建所有函数
管理3网络服务。
在你的项目中只需要创建一个对象
并调用所有网络服务中的函数
。
My idea is, you can create aclass
for manage the 3 webservice. Then you add your webservice with Add/Service Reference and then in the newclass
you can create all thefunctions
for management the 3 webservice.
In your project only need create oneobject
and call thefunctions
in all the webservices.
public class WebService
{
#region webservice1
//functions
#endregion
#region webservice2
//functions
#endregion
#region webservice3
//functions
#endregion
}
public void GetNames()
{
WebService ws = new WebService();
string[] names1 = ws.webservice1_GetNames();
string[] names2 = ws.webservice2_GetNames();
string[] names3 = ws.webservice3_GetNames();
}
我希望我能帮到你。
快乐编码
I hope I can help you.
Happy codding