假设我有这个类并且所有方法都正确实现(在这种情况下,我认为实现与问题无关)。
static class ZedGraphHelper
{
public static ZedGraph.ZedGraphControl GetZedGraph(Guid config, Guid equip)
{ throw new NotImplementedException; }
//This method here is the faulty one
public static void AdjustGraphParam(ZedGraph.ZedGraphControl zGraph, RP.mgrRPconfigGraph mgr)
{ throw new NotImplementedException; }
public static void FillGraph(ZedGraph.ZedGraphControl zGraph, Guid config, Guid equip, Guid form)
{ throw new NotImplementedException; }
public static void FillGraph(ZedGraph.ZedGraphControl zGraph, Shadow.dsEssais.FMdocDataTable dtDoc, Shadow.dsEssais.FMchampFormDataTable dtChamp)
{ throw new NotImplementedException; }
public static void LoadDoc(Shadow.dsEssais.FMdocDataTable dtDoc, Guid equip, Guid form)
{ throw new NotImplementedException; }
public static double LoadDonnee(Guid champ, Guid doc)
{ throw new NotImplementedException; }
public static SqlDataReader ReadDonnee(Guid champ, Guid doc)
{ throw new NotImplementedException; }
}
此代码编译良好并且没有设置错误。如果我将类声明从
static class ZedGraphHelper
至
public static class ZedGraphHelper
我收到以下错误消息:Inconsistent accessibility: parameter type 'RP.mgrRPconfigGraph' is less accessible than method 'Shadow.ZedGraphHelper.AdjustGraphParam(ZedGraph.ZedGraphControl, RP.mgrRPconfigGraph)'
此方法存在于我刚刚在这里包含的类声明中。方法是public static void
。
为什么我会收到此错误?公众是否会改变代码行为中的任何内容?