# PointPointPointPoint Struct

## Definición

Representa un par de coordenadas x e y en un espacio bidimensional.Represents an x- and y-coordinate pair in two-dimensional space.

``public value class Point : IFormattable``
``````[System.ComponentModel.TypeConverter(typeof(System.Windows.PointConverter))]
[System.Serializable]
public struct Point : IFormattable``````
``````type Point = struct
interface IFormattable``````
``````Public Structure Point
Implements IFormattable``````
Herencia
PointPointPointPoint
Atributos
Implementaciones

## Ejemplos

El ejemplo siguiente muestra cómo comprobar si dos Point estructuras no son iguales.The following example shows how to check if two Point structures are not equal. También muestra cómo asignar valores a un Point estructurar cuando se declara la estructura y después de la estructura se ha declarado.It also illustrates how to assign values to a Point structure when the structure is being declared and after the structure has been declared.

``````// Checks if two Points are equal using the overloaded inequality operator.
private Boolean pointInequalityExample()
{
// Checks if two Points are not equal using the overloaded inequality operator.

// Declaring point1 and initializing x,y values
Point point1 = new Point(10, 5);

// Declaring point2 without initializing x,y values
Point point2 = new Point();

// Boolean to hold the result of the comparison
Boolean areNotEqual;

// assigning values to point2
point2.X = 15;
point2.Y = 40;

// Compare Point structures for equality.
// areNotEqual is True
areNotEqual = (point1 != point2);

return areNotEqual;

}
``````
``````' Checks if two Points are equal using the overloaded inequality operator.
Private Function pointInequalityExample() As Boolean
' Checks if two Points are not equal using the overloaded inequality operator.

' Declaring point1 and initializing x,y values
Dim point1 As New Point(10, 5)

' Declaring point2 without initializing x,y values
Dim point2 As New Point()

' Boolean to hold the result of the comparison
Dim areNotEqual As Boolean

' assigning values to point2
point2.X = 15
point2.Y = 40

' Compare Point structures for equality.
' areNotEqual is True
areNotEqual = (point1 <> point2)

Return areNotEqual

End Function
``````

## Comentarios

En XAML, el delimitador entre los X y Y valores de un Point puede ser una coma o un espacio.In XAML, the delimiter between the X and Y values of a Point can be either a comma or a space.

Algunas referencias culturales podrían utilizar el carácter de coma como delimitador decimal en lugar del punto.Some cultures might use the comma character as the decimal delimiter instead of the period character. XAML de procesamiento para la referencia cultural de todos el valor predeterminado es en-US, en la mayoría de las implementaciones de procesadores XAML y espera que el punto como delimitador decimal.XAML processing for invariant culture defaults to en-US in most XAML processor implementations, and expects the period to be the decimal delimiter. Debe evitar utilizando la coma como delimitador decimal si especifica un Point en XAML, ya que entren en conflicto con la conversión de tipos de cadena de un Point atributo valor en el X y Y componentes.You should avoid using the comma character as the decimal delimiter if specifying a Point in XAML, because that will clash with the string type conversion of a Point attribute value into the X and Y components.

### Uso de atributos XAMLXAML Attribute Usage

``````<object property="x,y"/>
-or-
<object property="x y"/>
``````

### Valores XAMLXAML Values

xx
La coordenada x de esta estructura Point.The x-coordinate of this Point.

yy
La coordenada y de esta estructura Point.The y-coordinate of this Point.

## Constructores

 Point(Double, Double) Point(Double, Double) Point(Double, Double) Point(Double, Double) Crea una nueva estructura Point que contiene las coordenadas especificadas.Creates a new Point structure that contains the specified coordinates.

 X X X X Obtiene o establece el valor de la coordenada X de esta estructura Point.Gets or sets the X-coordinate value of this Point structure. Y Y Y Y Obtiene o establece el valor de la coordenada Y de esta estructura Point.Gets or sets the Y-coordinate value of this Point.