不明白为什么不一致的可访问性错误 - 都是公共的
本文关键字:错误 访问 为什么 明白 不一致 | 更新日期: 2023-09-27 18:27:47
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 326840139 AviramShiri 301374344''基础设施''功能逻辑外观.cs 55 21 面书应用程序
你这样声明FeaturesLogicEnum
:
class FeaturesLogicEnum
此时没有特定的访问修饰符。并且默认的访问修饰符是 internal
,而不是 public
。像这样将类声明为public
应该可以解决您的问题。
public class FeaturesLogicEnum