Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Point2D<T>
- {
- public T x { get; set; }
- public T y { get; set; }
- public Point2D(T x, T y)
- {
- this.x = x;
- this.y = y;
- }
- }
- public class Z<T> : Point2D<T>
- {
- public T z { get; set; }
- public Z(T x, T y, T z) : base(x, y)
- {
- this.z = z;
- }
- }
- public class Point3D<T>: Z<T>
- {
- public Point3D(T x, T y, T z) : base(x, y, z)
- {
- }
- public string GetPoint()
- {
- return "x +" + x + " y +" + y + " z +" + z;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement