Class Rectangle
The rectangle properties are height, width, and so on.
[DataContract]
public class Rectangle
- Inheritance
-
Rectangle
- Inherited Members
Constructors
Rectangle(float, float, float, float)
Initializes a new instance of the Rectangle class.
public Rectangle(float x = 0, float y = 0, float width = 0, float height = 0)
Parameters
xfloatGets or sets the x. (default to 0F).
yfloatGets or sets the y. (default to 0F).
widthfloatGets or sets the width. (default to 0F).
heightfloatGets or sets the height. (default to 0F).
Properties
Height
Gets or sets the height of rectangle.
[DataMember(Name = "height", EmitDefaultValue = false)]
public float Height { get; set; }
Property Value
- float
Gets or sets the height.
Width
Gets or sets the width of rectangle.
[DataMember(Name = "width", EmitDefaultValue = false)]
public float Width { get; set; }
Property Value
- float
Gets or sets the width.
X
Gets or sets the x.
[DataMember(Name = "x", EmitDefaultValue = false)]
public float X { get; set; }
Property Value
- float
Gets or sets the x.
Y
Gets or sets the y.
[DataMember(Name = "y", EmitDefaultValue = false)]
public float Y { get; set; }
Property Value
- float
Gets or sets the y.
Methods
ToJson()
Returns the JSON string presentation of the object
public virtual string ToJson()
Returns
- string
JSON string presentation of the object