BorrowedList<TElement>.ReplaceWith Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| ReplaceWith(BorrowedList<TElement>) |
Replaces the current content of the BorrowedList<TElement> with the elements
from |
| ReplaceWith(IEnumerable<TElement>) |
Replaces the current content of the BorrowedList<TElement> with the elements
from |
ReplaceWith(BorrowedList<TElement>)
Replaces the current content of the BorrowedList<TElement> with the elements
from other and disposes other.
public void ReplaceWith(Microsoft.VisualStudio.Utilities.BorrowedList<TElement> other);
member this.ReplaceWith : Microsoft.VisualStudio.Utilities.BorrowedList<'Element> -> unit
Public Sub ReplaceWith (other As BorrowedList(Of TElement))
Parameters
- other
- BorrowedList<TElement>
The new elements the BorrowedList<TElement> will contain will contain after this method returns.
Remarks
All current elements of this instance of BorrowedList<TElement> are removed.
This method disposes other.
other cannot be the this same instance of BorrowedList<TElement>.
Applies to
ReplaceWith(IEnumerable<TElement>)
Replaces the current content of the BorrowedList<TElement> with the elements
from elements.
public void ReplaceWith(System.Collections.Generic.IEnumerable<TElement> elements);
member this.ReplaceWith : seq<'Element> -> unit
Public Sub ReplaceWith (elements As IEnumerable(Of TElement))
Parameters
- elements
- IEnumerable<TElement>
The new elements the BorrowedList<TElement> will contain will contain after this method returns.
Remarks
This method is safe to call even if elements is an IEnumerable<T> based on this instance of BorrowedList<TElement>.