DependencyObjectCollection.First 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.
Returns the iterator for iteration over the items in the collection.
public:
virtual IIterator<DependencyObject ^> ^ First() = IIterable<DependencyObject ^>::First;
IIterator<DependencyObject> First();
public IIterator<DependencyObject> First();
function first()
Public Function First () As IIterator(Of DependencyObject)
Returns
The iterator object. The iterator's current position is at the 0-index position, or at the collection end if the collection is empty.
Implements
Remarks
You can iterate through a DependencyObjectCollection in C# or Microsoft Visual Basic. In many cases, such as using foreach syntax, the compiler does this casting for you and you won't need to cast to IEnumerable<DependencyObject>
explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable with a DependencyObject constraint.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for