CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014

    "no suitable method found for add()" error

    I'm getting that error in the title and I've never encountered it before can someone enlighten me on how to fix it

    Here's my first class: http://pastebin.com/rCaQa4Yd

    Here's my test class where the error resides: http://pastebin.com/t5L6Ummm

    The error is in line 31

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: "no suitable method found for add()" error

    If you want to store a Customer object in the arraylist, you need to declare the array as such.

    Rather than
    ArrayList<String> customerList;
    ArrayList<Customer> customerList;

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.