This document is archived and information here might be outdated.  Recommended version.


IPoint.X Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPoint Interface > IPoint.X Property
ArcGIS Developer Help

IPoint.X Property

The X coordinate.

[Visual Basic .NET]
Public Property X As Double
[C#]
public double X {get; set;}
[C++]
HRESULT get_X(
  System.Double* X
);
[C++]
HRESULT put_X(
  double X
);
[C++]
Parameters
X [out, retval]

X is a parameter of type double* X
X is a parameter of type double

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Returns and Sets the X coordinate of the Point.  The X coordinate is the horizontal position of the point.

[C#]

    // The following example shows how to set the x,y,z,m properties
    // for a point. Note that you need to tell the point to be
    // M- and Z-aware.
    public void DisplayCoordinates()
    {
        IPoint point = new PointClass();
        point.PutCoords(100, 100);
        IMAware mAware = point as IMAware;
        mAware.MAware = true;
        IZAware zAware = point as IZAware;
        zAware.ZAware = true;
        point.Z = 50;
        point.M = 10;
        System.Windows.Forms.MessageBox.Show(point.X + "," + point.Y + "," + point.Z + "," + point.M);
    }

 

See Also

IPoint Interface | IPoint.Y Property | IPoint.Z Property | IPoint.M Property