PathSegmentCollection.Add(PathSegment) Method

Definition

Adds a PathSegment to the end of the collection.

C#
public void Add(System.Windows.Media.PathSegment value);

Parameters

value
PathSegment

The segment to add to the collection.

Implements

Exceptions

value is null.

The PathSegmentCollection is read-only.

-or-

The PathSegmentCollection has a fixed size.

Remarks

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.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also