Assigning List with Points from one C# class into another C# class

Hi everyone,
I was doing the ICD-Course from 2017 today and tried to make some changes,where the problem occured.

I have a class relying on the standard Grasshopper template to harvest the values from Grasshopper and than pass them to another class.


I am getting the Points read in correctly, but when I want to use them in the other class, the list comes in as null.

I cant understand how to assing the List correctly?

Thanks in advance!

Hi Baris,

StartPts is not pointing to any valid address in memory, hence the null reference exception. If you initialize it within your constructor, the problem will be solved.

StartPts = new List<Point3d>();

Yes! Thanks again Nicholas!