ObjectExtensionsInT(T, IEnumerableT) Method
Gets whether
item is among the results of
set.
See the
Examples section of the
InT(T, T) overload for an example.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static bool In<T>(
this T item,
IEnumerable<T>? set
)
<ExtensionAttribute>
Public Shared Function In(Of T) (
item As T,
set As IEnumerable(Of T)
) As Boolean
public:
[ExtensionAttribute]
generic<typename T>
static bool In(
T item,
IEnumerable<T>^ set
)
[<ExtensionAttribute>]
static member In :
item : 'T *
set : IEnumerable<'T> -> bool
- item T
- The item to search for in the results of set.
- set IEnumerableT
- The set of items in which to search the specified item.
- T
- The type of item and the set elements.
Boolean if
item is among the elements of
set; otherwise,
.In Visual Basic and C#, you can call this method as an instance method on any object of type
T. 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).