ResourceDictionary.First Method
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 an iterator for the items in the collection.
public:
virtual IIterator<IKeyValuePair<Platform::Object ^, Platform::Object ^> ^> ^ First() = IIterable<IKeyValuePair<Platform::Object ^, Platform::Object ^> ^>::First;
IIterator<IKeyValuePair<IInspectable, IInspectable const&>> First();
public IIterator<KeyValuePair<object,object>> First();
function first()
Public Function First () As IIterator(Of KeyValuePair(Of Object, Object))
IIterator<IKeyValuePair<Platform::Object,Platform::Object>>
IIterator<IKeyValuePair<IInspectable,IInspectable>>
The iterator. The iterator's current position is at the 0-index position, or at the collection end if the collection is empty.
You can iterate through a ResourceDictionary 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<KeyValuePair>
explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable with a KeyValuePair<Object,Object> constraint.
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |