Ok, I am making a wrapper of a class that has very long path to get variables. By example, it has the following:
Class1.Location.Point.X
Class1.Location.Point.Y
Class1.Location.Point.Z
Class1.Location.Curve.get_EndPoint(0).X
Class1.Location.Curve.get_EndPoint(0).Y
Class1.Location.Curve.get_EndPoint(0).Z
Class1.Location.Curve.get_EndPoint(1).X
Class1.Location.Curve.get_EndPoint(1).Y
Class1.Location.Curve.get_EndPoint(1).Z
Now, in my wrapper, I would like to simplify it to this:
Wrapper.X
Wrapper.Y
Wrapper.Z
Wrapper.P0.X
Wrapper.P0.Y
Wrapper.P0.Z
Wrapper.P1.X
Wrapper.P1.Y
Wrapper.P1.Z
My wrapper look like about this:
public class Wrapper
{
protected Class1 c1 = null
public Wrapper(Class1 cc1)
{
c1 = cc1;
}
public int X
{
get{return C1.Location.Point.X;}
}
public int Y
{
get{return C1.Location.Point.Y;}
}
public int Z
{
get{return C1.Location.Point.Z;}
}
}
Now my problem is the P0.X and cie. I don't know how to do it. I tried with a subclass, but it doesnt allow me to get access to my variable c1. How can I do this?