R# 6.0 Argument type not assignable to parameter

I have the following code

   using MalibuHelper;  //This has the ILogger definition

    public partial class MainForm : Form, ILogger
        private MalibuMediator _malibuMediator;

        public MainForm()

        private void MainFormInit()
            _malibuMediator = new MalibuMediator(this);

R# 6.0 is flagging the "this" in the bolded call above to new MalibuMediator(this).  "Argument type MalibuControl.MainForm is not assignable to parameter type 'MalibuHelper.ILogger'. The code compiles and runs fine, I can't figure out what R# doesn't like. One of the suggested fixes is to have MainForm implment ILogger which it already does. In fact selecting that fix just adds another, ILogger to the end of the MainForm declaration. ILogger is nothing more than this:
    public interface ILogger
        void Log(String msg);
        void Log(LogStatusType theType, String msg);
        void UpdateStatusBar(StatusBarArea theArea, String msg);

Trying the casting solutions proposed by R# doesn't help either, a similar error occurs. Does anyone know what R# 6.0 doesn't like and is trying to tell me?

1 comment
Comment actions Permalink

Hours later I noticed the error went away. Not sure what happened.  I would delete my question if I knew how.


Please sign in to leave a comment.