ResourceContextLanguagesVectorView 类

定义

表示 ResourceContext 语言限定符的集合。

public ref class ResourceContextLanguagesVectorView sealed : IIterable<Platform::String ^>, IVectorView<Platform::String ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ResourceContextLanguagesVectorView final : IIterable<winrt::hstring>, IVectorView<winrt::hstring>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ResourceContextLanguagesVectorView : IEnumerable<string>, IReadOnlyList<string>
Public NotInheritable Class ResourceContextLanguagesVectorView
Implements IEnumerable(Of String), IReadOnlyList(Of String)
继承
Object Platform::Object IInspectable ResourceContextLanguagesVectorView
属性
实现
IEnumerable<String> IIterable<Platform::String> IIterable<winrt::hstring> IIterable<T> IEnumerable<T> IReadOnlyList<String> IVectorView<Platform::String> IVectorView<winrt::hstring>

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

集合成员列表

对于 JavaScript,ResourceContextLanguagesVectorView 的成员显示在成员列表中。 此外,ResourceContextLanguagesVectorView 支持 length 属性、 Array.prototype 的成员以及使用索引访问项。

枚举 C# 或 Microsoft Visual Basic 中的集合

ResourceContextLanguagesVectorView 是可枚举的,因此可以使用特定于语言的语法(如 C# 中的 foreach )枚举集合中的项。 编译器为你执行类型强制转换,你无需显式强制转换为 IEnumerable<String> 。 如果需要显式强制转换(例如,如果要调用 GetEnumerator),请使用 String 约束强制转换为 IEnumerable<T>

属性

Size

获取集中 的 ResourceContext 语言限定符的数目。

方法

First()

返回一个迭代器,用于枚举 ResourceContext 语言限定符集中的项。

GetAt(UInt32)

返回集合中指定索引处的 ResourceContext 语言限定符。

GetMany(UInt32, String[])

返回从集中的指定索引处开始的 ResourceContext 语言限定符。

IndexOf(String, UInt32)

返回集中指定 ResourceContext 语言限定符的索引。

适用于