不明白为什么不一致的可访问性错误 - 两者都是公开的

时间:2013-08-14 08:13:11

标签: c# facade

public partial class FeaturesLogicFacade
{
    private WorldPassportLogic m_WorldPassportLogic;
    private LikedByApp m_LikedByApp;

    private FeaturesLogicFacade()
    {
        m_WorldPassportLogic = new WorldPassportLogic();
        m_LikedByApp = new LikedByApp();
    }

    static readonly FeaturesLogicFacade MyFituresLogicFacade = new FeaturesLogicFacade();

    public static FeaturesLogicFacade FituresLogicFacade
    {
        get { return MyFituresLogicFacade; }
    }

public Dictionary<string, FriendsWithLike> LikedByOperation(FeaturesLogicEnum.eLikedByAppTypes i_eLikedByAppTypes, User i_LoggedInUser) 

public void SubSystemOperation(FeaturesLogicEnum.eFeatures i_FeatureType)

class FeaturesLogicEnum
{
    public enum eFeatures
    {
        NewsFeed,
        Events,
        Massages,
        Checkins,
        Photos,           
        Friends
    };

    public enum eLikedByAppTypes
    {
        SetPicturesLikedByDictionary,
        SetPostsLikedByDictionary,
        SetStatusesLikedByDictionary
    };
    }
}
  

错误2可访问性不一致:参数类型   'FaceBookApplication.FeaturesLogicEnum.eFeatures'不太容易访问   比方法   'FaceBookApplication.FeaturesLogicFacade.SubSystemOperation(FaceBookApplication.FeaturesLogicEnum.eFeatures)'C:\ Users \ aviram \ Desktop \ ex02 \ C13   Ex01 MinhDangPhamNguyet 32​​6840139 AviramShiri   301374344 \ Infrastructure \ FeaturesLogicFacade.cs 55 21 FaceBookApplication

1 个答案:

答案 0 :(得分:4)

你这样声明FeaturesLogicEnum

class FeaturesLogicEnum

此时没有特定的访问修饰符。默认访问修饰符为internal,而不是public。将此类声明为public就可以解决您的问题。

public class FeaturesLogicEnum