Generic List .First not working LINQ

Posted by Hurricanepkt on Stack Overflow See other posts from Stack Overflow or by Hurricanepkt
Published on 2010-04-23T19:27:16Z Indexed on 2010/04/23 19:33 UTC
Read the original article Hit count: 237

Filed under:
|
        var stuff = ctx.spReport();
        var StuffAssembled = new List<ReportCLS>();
        var val = new List<ReportCLS>();
        foreach (var item in stuff)
        {
            StuffAssembled.Add(new ReportCLS(item));

        }

        val.Add(StuffAssembled.First());

Keeps throwing

System.Collections.Generic.List' does not contain a definition for 'First' and no extension method 'First' accepting a first argument of type 'System.Collections.Generic.List' could be found (are you missing a using directive or an assembly reference?)

what is going wrong ?

moreover how do i fix it?

Thanks

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about c#