Search code examples
dotnetnukeoverloadingadditionblogsdotnetnuke-module

Overload resolution failed because no accessible 'Add' accepts this number of arguments


I am working on a DNN i.e. DOTNETNUKE. i have downloaded dnn blog 4.1.0 from codeplex. Now when i tried to build the project, it is throwing me error for the below CODE:

MyActions.Add(GetNextActionID, GetString("msgEditBlogSettings", LocalResourceFile), "", Url:=EditUrl("BlogID", m_oBlog.BlogID.ToString(), "Edit_Blog"), Secure:=DotNetNuke.Security.SecurityAccessLevel.Edit, Visible:=True)

Error is

Overload resolution failed because no accessible 'Add' accepts this number of arguments

As i can see in the inteligence help provided by Visual Studio, Add can have three parameters, but in the above code line it is taking 4 parameters, i am not sure why. How can i resolve this issue, please help me. any idea will be appreciated. Thanks in advance.


Solution

  • I don't know the language you are programming in, or the context, but when I see Errors like this, I look if one of the inlined function calls (GetString, or EditUrl in this case), have been closed to early -- i.e. one of the arguments you are passing to Add should actually be an Argument to one of these methods.

    Good luck.