IEnumerableExtensionFirstOrNullHasGroupTSource Method
Namespace: FolkerKinzel.VCards.ExtensionsAssembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.0.1+a91cc3f0fd39aeb548e16006a60ca9dd10a304a2
public static TSource FirstOrNullHasGroup<TSource>(
this IEnumerable<TSource>? values,
string? group,
bool skipEmptyItems = true
)
where TSource : VCardProperty
<ExtensionAttribute>
Public Shared Function FirstOrNullHasGroup(Of TSource As VCardProperty) (
values As IEnumerable(Of TSource),
group As String,
Optional skipEmptyItems As Boolean = true
) As TSource
public:
[ExtensionAttribute]
generic<typename TSource>
where TSource : VCardProperty
static TSource FirstOrNullHasGroup(
IEnumerable<TSource>^ values,
String^ group,
bool skipEmptyItems = true
)
[<ExtensionAttribute>]
static member FirstOrNullHasGroup :
values : IEnumerable<'TSource> *
group : string *
?skipEmptyItems : bool
(* Defaults:
let _skipEmptyItems = defaultArg skipEmptyItems true
*)
-> 'TSource when 'TSource : VCardProperty
- values IEnumerableTSource
- The IEnumerableT of VCardProperty
objects to search. The collection may be null, empty, or may contain null
references.
- group String
- The Group identifier
to compare with.
- skipEmptyItems Boolean (Optional)
- Pass false to include empty items in the search.
("Empty" means that IsEmpty returns true.) null
values will always be ignored.
- TSource
- Generic type parameter that's constrained
to be a class that's derived from VCardProperty.
TSourceThe first item in
values whose
Group
identifier matches
group, or
null if no such item could be found.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
The comparison of group identifiers is case-insensitive.