An ordered collection of coordinates representing a multi-part line.
Object Model
Syntax
Example
C# | Copy Code |
---|
// creates a new empty polyline Polyline polyline = new Polyline(); Debug.WriteLine(polyline.IsValid.ToString()); //false // creates a new coordinate collection, assigns it to the polyline CoordinateCollection ccbig = new CoordinateCollection(); ccbig.Add(0, 0); ccbig.Add(0, 1000.0); ccbig.Add(0, 1000.0); // duplicated one ccbig.Add(100.0, 1000.0); polyline.AddPart(ccbig); Debug.WriteLine(polyline.IsValid.ToString()); // true Debug.WriteLine(polyline.GetPart(0).Count.ToString()); //4 polyline.Validate(); // duplicated points are removed ebug.WriteLine(polyline.GetPart(0).Count.ToString()); //3 |
Inheritance Hierarchy
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also