以下のコードがあり、いくつかの継承の練習をしようとしていますが、このコードを実行しようとするとエラーが発生します:
Inconsistent Accessability: Base Class is less accessible than class
コード:
class Program
{
static void Main()
{
FoodProducts Test = new FoodProducts();
Test.Limit();
}
}
public class FoodProducts : Products
{
public void FoodProduct()
{
Console.WriteLine("This is food product");
}
public void Limit()
{
Console.WriteLine("This is an Attribute of a Product");
}
}
誰かが私を助けることができますか?