.net 4.5 - Cannot implicitly convert type 'System.Collections.Generic.ICollection' C# 4.5 -


i have below property.

 public virtual icollection<buildappstat> parentbuildappstats { get; set; } 

i assigning buildappstat object property:

pagebuildversion.parentbuildappstats = buildappstat; 

however getting below error:

error 218 cannot implicitly convert type 'sitepartbiz.models.objects.buildappstat' 'system.collections.generic.icollection<sitepartbiz.models.objects.buildappstat>'. explicit conversion exists (are missing cast?) c:\d2\sitepart\sitepartbiz\repository\pagebuildvrsnrepository.cs 94 52 sitepartbiz

can please advise how fix this?

whatever assigning pagebuildversion.parentbuildappstats must collection of type buildappstat. can list or icollection.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -