Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. class Contauner {
  2.  
  3.     private List<Point> _points = new List<Point>;
  4.  
  5.     public Contauner() {}
  6.  
  7.     public Contauner(List<Point> points) {
  8.         this._points = points;
  9.     }
  10.  
  11.     public void addPoint(Point point) {
  12.         this._points.Add(point);
  13.     }
  14.  
  15.     public void deletePointByIndex(int index){
  16.         this._points.RemoveAt(index);
  17.     }
  18.  
  19.     public void deletePoint(Point point){
  20.         this._points.RemoveAt(point);
  21.     }
  22.  
  23.     public Point this[int i]
  24.     {
  25.       get { return this._points.get(i); }
  26.       set { this._points.get(i) = value; }
  27.     }
  28.  
  29.     public List<Point> Points
  30.     {
  31.          get { return _points; }
  32.          set { _points = value; }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement