System::Collections::Generic::IEnumerable::LINQ_GroupBy 方法

IEnumerable::LINQ_GroupBy(System::Func<Source, Key>) method

template<typename Key> SharedPtr<IEnumerable<SharedPtr<System::Linq::IGrouping<Key, Source>>>> System::Collections::Generic::IEnumerable<T>::LINQ_GroupBy(System::Func<Source, Key> keyPredicate)

另见

IEnumerable::LINQ_GroupBy(System::Func<Source, Key>, System::Func<Source, Element>) method

template<typename Key,typename Element> SharedPtr<IEnumerable<SharedPtr<System::Linq::IGrouping<Key, Element>>>> System::Collections::Generic::IEnumerable<T>::LINQ_GroupBy(System::Func<Source, Key> keyPredicate, System::Func<Source, Element> elementSelector)

另见

IEnumerable::LINQ_GroupBy(System::Func<T, Key>) method

对序列的元素进行分组。

template<typename Key> System::SharedPtr<IEnumerable<System::SharedPtr<System::Linq::IGrouping<Key, T>>>> System::Collections::Generic::IEnumerable<T>::LINQ_GroupBy(System::Func<T, Key> keyPredicate)
参数描述
Key由 keyPredicate 返回的键的类型
参数类型描述
keyPredicateSystem::Func<T, Key>用于提取每个元素键的函数。

ReturnValue

一个包含对象序列和键的 IEnumerable

另见

IEnumerable::LINQ_GroupBy(System::Func<T, Key>, System::Func<T, Element>) method

对序列的元素进行分组。

template<typename Key,typename Element> System::SharedPtr<IEnumerable<System::SharedPtr<System::Linq::IGrouping<Key, Element>>>> System::Collections::Generic::IEnumerable<T>::LINQ_GroupBy(System::Func<T, Key> keyPredicate, System::Func<T, Element> elementSelector)
参数描述
Key由 keyPredicate 返回的键的类型
ElementelementSelector 返回的元素的类型
参数类型描述
keyPredicateSystem::Func<T, Key>用于提取每个元素键的函数。
elementSelectorSystem::Func<T, Element>用于提取每个元素值键的函数。

ReturnValue

一个包含对象序列和键的 IEnumerable

另见