I think that I am misunderstanding the purpose of a get; set; in C#. I have a list of doubles that I am trying to populate and I am using the following code...Both of these are in the same class and when I try to run this, I get a Null reference exception when trying to populate the list. What exactly am I misunderstanding?
public List<double> NewData
{ get; set; }
public InfoFile(String fileName, String groupName)
{
this.group = groupName;
test = File.ReadAllLines(fileName);
FileInfo label = new FileInfo(fileName);
this.name = Path.GetFileName(fileName);
isDrawn = false;
for (int t = 2; t < test.Length; t++)
{
NewData.Add(double.Parse(test[t].Substring(6, 4)));
}
}