PathSegmentCollection.Add(PathSegment) Method

Definition

Adds a PathSegment to the end of the collection.

public:
 virtual void Add(System::Windows::Media::PathSegment ^ value);
public void Add (System.Windows.Media.PathSegment value);
abstract member Add : System.Windows.Media.PathSegment -> unit
override this.Add : System.Windows.Media.PathSegment -> unit
Public Sub Add (value As PathSegment)

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

See also