vb.net - Value of type '1-dimensional array of '' cannot be converted to '' -


the error below happens on building, feature , listingimage:

error 17  value of type '1-dimensional array of propgenie_webservice.building' cannot converted 'system.collections.generic.list(of propgenie_webservice.building)'. 

so webservice uses listings, in listings buildings, features, listingimages etc.. building can have area unit en size can see code. have tried make arrays still error. have been stuck on whole day , stuck..

my code in webservice:

  }, _          .features = {new feature() { _              .name = "bedrooms", _              .count = "2" _         }}, _          .images = {new listingimage() { _              .caption = "awesomesauce", _              .url = "http://company.com/assets/index_background-84ec0c49973c354e38aea4b19d440e69.jpg" _         }, new listingimage() { _              .caption = "awesomesauce", _              .url = "http://company.com/assets/index_background-84ec0c49973c354e38aea4b19d440e69.jpg" _         }}, _          .buildings = {new building() { _              .areaunit = "sqm", _              .areavalue = 1000 _         }} _     } 

and example of building:

public property areaunit() string                     return m_areaunit         end         set(value string)             m_areaunit = value         end set     end property     private m_areaunit string 

and sample listings class

 buildings = new list(of building)()         features = new list(of feature)()         images = new list(of listingimage)() ... public property buildings() list(of building)                     return m_buildings         end         set(value list(of building))             m_buildings = value         end set     end property 

please let me know if other code needed.

what have tried still errors

}, _          .features = new list(of feature) { new feature(){ { _     'with error: expression expected              .name = "bedrooms",               .count = "2" _     'error: not member of listings         }}, _          .images = new list(of listingimage) { new listingimage(){ { _              .caption = "awesomesauce", _              .url = "http://company.com/assets/index_background-84ec0c49973c354e38aea4b19d440e69.jpg" _      'error: not member of listings         }, new listingimage() { _              .caption = "awesomesauce", _              .url = "http://company.com/assets/index_background-84ec0c49973c354e38aea4b19d440e69.jpg" _         }}, _          .buildings = new list(of building) { new building(){ { _              .areaunit = "sqm", _              .areavalue = 1000 _         }} _     } 

.buildings =  {new building() { _          .areaunit = "sqm", _          .areavalue = 1000 _     }} 

creates array of building, need list:

.buildings = new list(of building) { new building() {...}} 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -