Array instead of List in WCF Service Proxy Generated using svcutil.exe
问题 I have a ServiceContract , using System.Collections.Generic; using System.ServiceModel; namespace MainModule.Sub.Communication { [ServiceContract] public interface IWebMethod { [OperationContract(IsOneWay = false)] bool InvokeAlert(List<int> userIds); [OperationContract(IsOneWay = false, Name = "InvokeAlertByMainID")] bool InvokeAlert(List<int> userIds, int mainId); [OperationContract(IsOneWay = true)] void DeletePopupNotifications(System.Data.DataSet deletedNotifications); } } I used below