class Frame
{
static int X;
static int Y;
static uint Color;
static protected bool Check()
{
return (Coords.GetPixelColor(X, Y) == Color);
}
}
class frameBeginning : Frame
{
static int X = 1;
static int Y = 2;
static int Color = 3;
}
Run Code Online (Sandbox Code Playgroud)
frameBeginning.Check();
无法编译,因为Check()
其保护级别无法访问.
但为什么,Check()
受到保护?