This document is archived and information here might be outdated. Recommended version. |
Indicates if a geometry has been changed (edited, projected, etc).
[Visual Basic .NET]
Public Property Changed As Boolean
[C#]
public bool Changed {get; set;}
[C++]
HRESULT get_Changed(
Boolean* isChanged
);
[C++]
HRESULT put_Changed(
VARIANT_BOOL isChanged
);
[C++] Parameters isChanged [out, retval]
isChanged is a parameter of type bool* isChanged
isChanged is a parameter of type bool
The Changed method returns whether or not the geometry has been modified. If the geometry always stays in memory that method only returns 'false' immediately after its creation. However if the shape came from disk the Changed method will return 'false' until de geometry is modified in memory.
//This example demonstrates how to use the Changed method
private void Changed_Example()
{
IEnvelope envelope = new EnvelopeClass();
envelope.PutCoords(0, 0, 20, 20);
ISegmentCollection segmentCollection = new PolygonClass();
segmentCollection.SetRectangle(envelope);
IGeometry4 geometry = segmentCollection as IGeometry4;
System.Windows.Forms.MessageBox.Show("Just after creation : " + geometry.Changed);
segmentCollection.SetRectangle(envelope);
System.Windows.Forms.MessageBox.Show("Just after modification : " + geometry.Changed);
}