C#C
C#4y ago
phattanuki

Should you assert input arguments ins

Why am I getting a null-reference error here?

namespace Joust_.Manager {
    public static class GenerateSkillList {
        public static List<ISkill> AllSkills { get; } = GenerateSkillList.Setup();
        private static List<ISkill> Setup() {
            //do I have a better way to do this?
            AllSkills.Add(new Skills.Attack());
            AllSkills.Add(new Skills.Defend());
            AllSkills.Add(new Skills.Warcry());
            AllSkills.Add(new Skills.ThrowSmellyCheese());
            return AllSkills;
        }
    }
}
unknown.png
Was this page helpful?