PathSegmentCollection.Add Method (PathSegment)


Adds a PathSegment to the end of the collection.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public void Add(
	PathSegment value


Type: System.Windows.Media.PathSegment

The segment to add to the collection.

Exception Condition

value is null.


The PathSegmentCollection is read-only.

- or -

The PathSegmentCollection has a fixed size.

Because PathSegment objects derive from Freezable, they are copied when they are used. Therefore, you might not be able to later retrieve or remove the PathSegment you added to the collection using the original PathSegment object; the PathSegment in the collection is a copy of the original PathSegment and is considered a different PathSegment than the one you added.

Unlike typical implementations of ICollection<T>.Add, this implementation throws an ArgumentException if you attempt to add a null (Nothing) reference.

.NET Framework
Available since 3.0
Return to top