The non-generic 'System.Collections.ArrayList;' Cannnot be used with type arguments

SamirSamedovSamirSamedov TRMember
edited October 2015 in Visual Studio

Hello , How to use n class In aa ArrayList<> , above I have imported using System.Collections; but having errors with it, could anyone show me the way. Thank you

public class CompanyMarka
    {
        String comp_name;
        String comp_marka;

        ArrayList whoseMarka;

        public CompanyMarka (ArrayList whoseMarka)
        {
            this.whoseMarka = whoseMarka;
        }

// and field get setters
From Other Classs I need to use it

ArrayList<CompanyMarka> markaListeleri = new ArrayList<CompanyMarka>();

Tagged:

Answers

  • SamirSamedovSamirSamedov TRMember
    edited October 2015

    The solution is

    using System.Collections.Generic;    
    
    List<String>whoseMarka = = new List<string> ();
    

    if anyone would have the same problem.

Sign In or Register to comment.