Murari Jha

Murari Jha

  • 1.7k
  • 137
  • 8.7k

Service Reference is using Arrays instead of List<Type>

May 25 2018 4:32 AM
Hi Dear,
 
I have an issue in WCF.
 
Problem is WCF proxy by default generate Array type class but after a simple selection Collection Type-- List it will generate list type(Here is DataContractSerialization).
 
But in our scenario after changing the Collection Type-- Array to List  but again proxy is remaining same as array class(Here is XMLSerializer).  
 
Please suggest me.
  1. ///  
  2. [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=0)]  
  3. public AvailabilityRequest[] AvailabilityRequests {  
  4. get {  
  5. return this.availabilityRequestsField;  
  6. }  
  7. set {  
  8. this.availabilityRequestsField = value;  
  9. this.RaisePropertyChanged("AvailabilityRequests");  
  10. }  
  11. }