C# 如何将项添加到web服务类的数组中?
我正在使用一个包含自己类的soapweb服务。 Web服务接收一个数组,我想创建许多项并将它们添加到数组中,但我不知道如何创建 这是我的密码: *wshr=web服务的名称C# 如何将项添加到web服务类的数组中?,c#,vb.net,web-services,C#,Vb.net,Web Services,我正在使用一个包含自己类的soapweb服务。 Web服务接收一个数组,我想创建许多项并将它们添加到数组中,但我不知道如何创建 这是我的密码: *wshr=web服务的名称 我不是问如何使用web服务。我的问题是如何为该web服务使用数组。如果我能找到web服务的自动版本,我在这里没有问。 wshr.HConductor _HCond = new wshr.HConductor(); _HCond.TpoDocumento = "L.E."; _H
我不是问如何使用web服务。我的问题是如何为该web服务使用数组。如果我能找到web服务的自动版本,我在这里没有问。
wshr.HConductor _HCond = new wshr.HConductor();
_HCond.TpoDocumento = "L.E.";
_HCond.NroDocumento = "12345678";
_HCond.FecInicio = "27/02/2016";
_HCond.HorInicio = "08:00";
_HCond.FecTermino = "27/02/2016";
_HCond.HorTermino = "09:00";
wshr.HConductor[] listaConductores = new wshr.HConductor[]
{
_HCond
};
wshr.HConductor[] listaConductores = new wshr.HConductor[5]
listaConductores[0]= yourlistaConductores1
listaConductores[1]= yourlistaConductores2
listaConductores[2]= yourlistaConductores3
listaConductores[3]= yourlistaConductores4
listaConductores[4]= yourlistaConductores5