![]()  | 
                    
                         This document is archived and information here might be outdated. Recommended version.  | 
                
| ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPoint Interface > IPoint.Z Property (ArcObjects .NET 10.5 SDK) | 
The Z attribute.
[Visual Basic .NET] Public Property Z As Double
[C#] public double Z {get; set;}
[C++]
HRESULT get_Z(
  double* Z
);
[C++]
HRESULT put_Z(
  double Z
);
[C++]
Parameters Z [out, retval] Z is a parameter of type double Z Z is a parameter of type double
Returns or Sets the Z attribute on the Point. Although the Z attribute refers to the 3-Dimensional depth of the point, the point still spatially exists in only 2-Dimensions with a Z attribute. Further, the point must be ZAware to make use of the Z attribute.
    // 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);
    }
IPoint Interface | IPoint.X Property | IPoint.Y Property | IPoint.M Property | IZ Interface | IPoint.Z Property | IZAware Interface | IZCollection Interface