Inconsistent Accessibility in Lists c# -


i'm following rpg c# tutorial, , have come across error. not explained in tutorial, , i'm unsure did wrong.

here class:

using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks;  namespace engine { public class monster : livingcreature {     public int id { get; set; }     public string name { get; set; }     public int maximumdamage { get; set; }     public int rewardexperiencepoints { get; set; }     public int rewardgold { get; set; }      public list<lootitem> loottable { get; set; }      public monster(int id, string name, int maximumdamage, int rewardexperiencepoints, int rewardgold, int currenthitpoints, int maximumhitpoints) : base (currenthitpoints, maximumhitpoints)     {         id = id;         name = name;         maximumdamage = maximumdamage;         rewardexperiencepoints = rewardexperiencepoints;         rewardgold = rewardgold;          loottable = new list<lootitem>();        }    } } 

the problem lies in: public list<lootitem> loottable { get; set; }

i error message: "inconsistent accessibility: property type 'list' less accessible property 'monster.loottable'"

i same error message in class, if can fix one, can fix other.

make lootitem class public,

public class lootitem     {      } } 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -