PathSegmentCollection.Add(PathSegment) Metoda
Definicja
PathSegment Dodaje na końcu kolekcji.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)
Parametry
- value
- PathSegment
Segment, który ma zostać dodany do kolekcji.The segment to add to the collection.
Implementuje
Wyjątki
value
jest null
.value
is null
.
Jest PathSegmentCollection tylko do odczytu.The PathSegmentCollection is read-only.
—lub—-or- PathSegmentCollection Ma stały rozmiar.The PathSegmentCollection has a fixed size.
Uwagi
Ponieważ PathSegment obiekty pochodzą z Freezable, są kopiowane, gdy są używane.Because PathSegment objects derive from Freezable, they are copied when they are used. W związku z tym może nie być możliwe późniejsze pobranie lub PathSegment usunięcie elementu, który został dodany do kolekcji przy użyciu oryginalnego PathSegment obiektu; PathSegment w kolekcji jest kopią oryginału i jest traktowana jako inna PathSegment PathSegment niż ten, który został dodany.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.
W przeciwieństwie do typowych ICollection<T>.Addimplementacji programu, ta implementacja ArgumentException zgłasza wyjątek, jeśli próbujesz dodać odwołanie o wartości null (Nothing).Unlike typical implementations of ICollection<T>.Add, this implementation throws an ArgumentException if you attempt to add a null (Nothing) reference.