Kayıtlar

Eylül, 2016 tarihine ait yayınlar gösteriliyor

Cannot implicitly convert type 'void' to 'System.Collections.Generic.ICollection'

Merhaba ; Bir list Colleciton 'a object eklemek istediğinizde  aşağıdaki hatayı alıyorsanız ; Örnek ;  ... Images = new List<Image>().Add( new Image() { Image = "name", ImageId = 1 }) ... Hata ; Cannot implicitly convert type 'void' to 'System.Collections.Generic.ICollection<xxx>' Add methodu void olduğundan hata verecektir. Yapmanız gereken Add methodunu silip {} parantez kulanmalısınız; ....Images = new List<Image>() { new Image() { Image = "name", ImageId = 1 }}... İyi çalışmalar