Exception: 'Object' does not contain a definition for 'Take'
foreach (var mc in CurrentNode.hAuditSpotlight.Skip(SkipContents).Take(10)) { }
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Take'
at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at KPMGAudit.Web.MainContents.FetchMainContentsByCategory(String Category, Int32 StartsFrom) in XXX:line XXX
If I use "Skip()" alone, it works; also "Take()" alone works, but while using both simultaneously throws the above exception.
Exception: 'Object' does not contain a definition for 'Take'
If I use "Skip()" alone, it works; also "Take()" alone works, but while using both simultaneously throws the above exception.
Any solution???!!!
Hi, could you post a little more of your code, specifically what is CurrentNode and also what is hAuditSpotlight?
Thanks,
Jeavon
Just an idea: I think it would be better if you use Where instead of Skip...
Hi Jeavon,
Thanks for your reply. I've posted a little more of my code here.
Ok, you need to a fair bit more to get MNTP converted to objects so you can skip and take:
is working on a reply...