.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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -