You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merged PR 21401: Update formatting in IKeyValuePair generic type
Update formatting in IKeyValuePair generic type. The greater than and less than signs for the generic were not rendering correctly in one of the Remarks paragraphs.
Copy file name to clipboardExpand all lines: windows.foundation.collections/ikeyvaluepair_2.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,14 +13,14 @@ public interface IKeyValuePair<K, V> :
13
13
14
14
Represents a key-value pair. This is typically used as a constraint type when you need to encapsulate two type parameters into one to satisfy the constraints of another generic interface.
15
15
16
-
> **.NET**
17
-
> This interface appears as [System.Collections.Generic.KeyValuePair<TKey,TValue>](/dotnet/api/system.collections.generic.keyvaluepair-2?view=dotnet-uwp-10.0&preserve-view=true) (a structure, not an interface). In any case where a Windows Runtime type has implemented IKeyValuePair<K,V>, .NET code can use the APIs of [KeyValuePair](/dotnet/api/system.collections.generic.keyvaluepair-2?view=dotnet-uwp-10.0&preserve-view=true) instead.
16
+
> [!NOTE]
17
+
> In .NET, this interface appears as [System.Collections.Generic.KeyValuePair<TKey,TValue>](/dotnet/api/system.collections.generic.keyvaluepair-2?view=dotnet-uwp-10.0&preserve-view=true) (a structure, not an interface). In any case where a Windows Runtime type has implemented IKeyValuePair<K,V>, .NET code can use the APIs of [KeyValuePair](/dotnet/api/system.collections.generic.keyvaluepair-2?view=dotnet-uwp-10.0&preserve-view=true) instead.
18
18
19
19
## -remarks
20
20
21
21
When programming with .NET, this interface is hidden and developers should use the [System.Collections.Generic.KeyValuePair<TKey,TValue>](/dotnet/api/system.collections.generic.keyvaluepair-2?view=dotnet-uwp-10.0&preserve-view=true) structure. In any case where a Windows Runtime type has implemented IKeyValuePair<K,V>, including when interfaces have inherited IKeyValuePair<K,V> or used it as an inner constraint, .NET code can treat it as a .NET [KeyValuePair](/dotnet/api/system.collections.generic.keyvaluepair-2?view=dotnet-uwp-10.0&preserve-view=true).
22
22
23
-
Key-value pairs are used in the [IMap<K,V>](imap_2.md) interface, when it inherits [IIterable<T>](iiterable_1.md). Practical implementations of [IMap<K,V>](imap_2.md) are iterable, and iterating or calling [First](iiterable_1_first_1920739956.md)/[Current](iiterator_1_current.md) explicitly will return instances of IKeyValuePair<K,V> using the same constraints as does the [IMap<K,V>](imap_2.md) implementation.
23
+
Key-value pairs are used in the [IMap<K,V>](imap_2.md) interface, when it inherits [IIterable<T>](iiterable_1.md). Practical implementations of [IMap<K,V>](imap_2.md) are iterable, and iterating or calling [First](iiterable_1_first_1920739956.md)/[Current](iiterator_1_current.md) explicitly will return instances of IKeyValuePair<K,V> using the same constraints as does the [IMap<K,V>](imap_2.md) implementation.
24
24
25
25
### C++/WinRT extension functions
26
26
@@ -47,10 +47,10 @@ is equivalent to,
47
47
auto key = kvp.Key();
48
48
auto value = kvp.Value();
49
49
```
50
-
50
+
51
51
Structured binding is particularly convenient in range-based `for` loops, letting you iterate through the key/value pairs of a map.
0 commit comments