Answer the question
In order to leave comments, you need to log in
Why doesn't an object reference point to an object instance?
This exception is thrown when trying to create an object of the Equipment class and add it to the List
. What is the problem?
Equipment class:
public class Equipment
{
public int countRun { get; set; }
public List<string> Boots { get; set; }
public List<string> Armors { get; set; }
public List<string> Gloves { get; set; }
public List<string> Helms { get; set; }
public List<string> Rings { get; set; }
public List<string> Amuls { get; set; }
public List<string> Formuls { get; set; }
public Equipment()
{
this.countRun = 0;
this.Boots = null;
this.Armors = null;
this.Gloves = null;
this.Helms = null;
this.Rings = null;
this.Amuls = null;
this.Formuls = null;
}
}
static class Equips
{
public static List<Equipment> Equip { get; set; }
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question