Stenway Developer Network

constructor Keyword

Constructor

Constructors

A class can have only one constructor.

namespace MyLib
  class Point2D
    field X
    field Y

    constructor(x, y)
      this.X = x
      this.Y = y
    end
  end
end