error in .net reflector

爱⌒轻易说出口 提交于 2019-12-20 06:15:24

问题


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 ?


回答1:


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; }
} 


来源:https://stackoverflow.com/questions/24445085/error-in-net-reflector

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!