Search code examples
c#reflector

error in .net reflector


i have reflected one program with .net reflector and open it in visual studio. one item in each form is:

bool IControlByOptions.get_IsDisposed()
{
  return this.IsDisposed;
}

when i build solution , it has an error : 'Solo.Module.CtrlProductForm.Solo.Base.IControlByEdition.get_IsDisposed()' explicit method implementation cannot implement 'Solo.Base.IControlByEdition.IsDisposed.get' because it is an accessor.

IControlByOptions file contents :

using System;

namespace Solo.Base
{
 public interface IControlByOptions
 {
    bool IsDisposed { get; }

    void RefreshUIFromCompanyOrPersonalOptions();
 }
}

how to fix this error ?


Solution

  • Try changing the implementation to

    bool IControlByOptions.IsDisposed
    {
        get { return this.IsDisposed; }
    }
    

    Update based on your comments. Try this for properties with setter.

    bool ICtrlTemplateOption.Visible
    {
        get { return this.Visible; }
        set { this.Visible = value; }
    }