locked
Error: The type or namespace name 'List' could not be found (are you missing a using directive or an assembly reference?) RRS feed

  • Question

  • I want to send a list, does anybody know whats wrong? I got following error:

    Error    1    The type or namespace name 'List' could not be found (are you missing a using directive or an assembly reference?)   




      private Domain.Application.Person MapToApplicationPerson(List<Domain.Webservice.Person> wPer)
            {
                Domain.Application.Person aPer = new Domain.Application.Person();
             
                    aPer.Id = wPer.Id;
                    aPer.Number = wPer.Number;
             
                return aPer;
            }

    Regards,
    Tom
    Wednesday, September 3, 2008 2:29 PM

Answers

  • Make sure you've got a "using System.Collections.Generic;" statement at the top of your code file.
    David Morton - http://blog.davemorton.net/
    • Marked as answer by nobugz Thursday, September 4, 2008 12:52 PM
    • Unmarked as answer by tomb_unaff Friday, September 5, 2008 8:19 AM
    • Marked as answer by tomb_unaff Friday, September 5, 2008 8:19 AM
    Wednesday, September 3, 2008 2:44 PM

All replies

  • Make sure you've got a "using System.Collections.Generic;" statement at the top of your code file.
    David Morton - http://blog.davemorton.net/
    • Marked as answer by nobugz Thursday, September 4, 2008 12:52 PM
    • Unmarked as answer by tomb_unaff Friday, September 5, 2008 8:19 AM
    • Marked as answer by tomb_unaff Friday, September 5, 2008 8:19 AM
    Wednesday, September 3, 2008 2:44 PM
  • yep, forgot include  this statement, thanks
    Friday, September 5, 2008 8:19 AM