How can i pass/use private variables froma class in Form1 with a public function?

前端 未结 5 753
粉色の甜心
粉色の甜心 2021-01-27 05:28

I don\'t want to make a new instance of Form1 in the class, and i dont want to use static.

I have these two variables which are private in the top of the cl

5条回答
  •  鱼传尺愫
    2021-01-27 05:42

    I don't know if I understand what you need.
    Anyway, you could try to use a public property:

    public List PointX { get { return Point_X; } }
    public List PointY { get { return Point_Y; } }
    

提交回复
热议问题