Struct Point
Represents an x- and y-coordinate pair in two-dimensional space. Can also represent a logical point for certain property usages.
Implements
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public struct Point : IFormattable
Constructors
| Improve this Doc View SourcePoint(Double, Double)
Initializes a Point structure that contains the specified values. contains the specified values.
Declaration
public Point(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x-coordinate value of the Point structure. |
System.Double | y | The y-coordinate value of the Point structure. |
Properties
| Improve this Doc View SourceX
Declaration
public double X { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The X-coordinate value of this Point structure. The default value is 0. |
Y
Declaration
public double Y { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The Y-coordinate value of this Point structure. The default value is 0. |
Methods
| Improve this Doc View SourceEquals(Object)
Determines whether the specified object is a Point and whether it contains the same values as this Point.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o | The object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if obj is a Point and contains the same X and Y values as this Point; otherwise, false. |
Overrides
Equals(Point)
Compares two Point structures for equality.
Declaration
public bool Equals(Point value)
Parameters
Type | Name | Description |
---|---|---|
Point | value | The point to compare to this instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if both Point structures contain the same X and Y values; otherwise, false. |
GetHashCode()
Returns the hash code for this Point.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this Point structure. |
Overrides
Parse(String)
Parse - returns an instance converted from the provided string using the culture "en-US"
Declaration
public static Point Parse(string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | string with Point data |
Returns
Type | Description |
---|---|
Point |
ToString()
Creates a System.String representation of this Point.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String containing the X and Y values of this Point structure. |
Overrides
ToString(IFormatProvider)
Creates a System.String representation of this Point.
Declaration
public string ToString(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.IFormatProvider | provider | Culture-specific formatting information. |
Returns
Type | Description |
---|---|
System.String | A System.String containing the X and Y values of this Point structure. |
Operators
| Improve this Doc View SourceEquality(Point, Point)
Compares two Point structures for equality.
Declaration
public static bool operator ==(Point point1, Point point2)
Parameters
Type | Name | Description |
---|---|---|
Point | point1 | The first Point structure to compare. |
Point | point2 | The second Point structure to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if both the X and Y values of point1 and point2 are equal; otherwise, false. |
Inequality(Point, Point)
Compares two Point structures for inequality
Declaration
public static bool operator !=(Point point1, Point point2)
Parameters
Type | Name | Description |
---|---|---|
Point | point1 | The first point to compare. |
Point | point2 | The second point to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if point1 and point2 have different X or Y values; false if point1 and point2 have the same X and Y values. |
Explicit Interface Implementations
| Improve this Doc View SourceIFormattable.ToString(String, IFormatProvider)
Creates a string representation of this object based on the format string and IFormatProvider passed in. If the provider is null, the CurrentCulture is used. See the documentation for IFormattable for more information.
Declaration
string IFormattable.ToString(string format, IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.String | format | |
System.IFormatProvider | provider |
Returns
Type | Description |
---|---|
System.String | A string representation of this object. |