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

  • Question

  • User670644709 posted

    this code generates an error of....

    Error	1	The type or namespace name 'MCItem' could not be found (are you missing a using directive or an assembly reference?)
    What should i do
     private List<MCItem> getMCList()
            {
                bool Encode = true;
                bool Validate = false;
                List<MCItem> lst = new List<MCItem>();
    
                listMembersInput input = new listMembersInput();
                input = LoadBaseInput<listMembersInput>(input, AccessType, OutType, MethodType, Encode, Validate);
    
                input.parms.apikey = apikey;
                input.parms.since = Convert.ToDateTime(lastrundate);
                input.parms.id = listid;
                input.parms.status = EnumValues.listMembers_status.unsubscribed;
                input.parms.limit = numrecs;
                listMembers cmd = new listMembers(input);
                listMembersOutput output = cmd.Execute();
    
                MCItem itm;
                foreach (listMembersResults ThisMember in output.result)
                {
                    itm = new MCItem();
                    itm = getMCItem(ThisMember.email);
                    lst.Add(itm);
                }
                return lst;
            }
    <p> I got the above code from somewhere and didn't know that how to run it, but this code is my requiremeny if it goes into running state</p>
    Tuesday, November 15, 2011 10:23 AM

Answers

  • User612574037 posted

    Hi,

    The “MCItem” may be included in a .dll file. You need to add it in the reference before you use it. You may look for it in the site where you get the code.

    Hope it can help you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 17, 2011 1:14 AM