 | ExtensionMethodskIsInT Method |
Determines whether the specified variable is contained within the "list".
Namespace:
Koden.Utils.Extensions
Assembly:
Koden.Utils (in Koden.Utils.dll) Version: 1.1.6453.26060
Syntaxpublic static bool kIsIn<T>(
this T source,
params T[] list
)
<ExtensionAttribute>
Public Shared Function kIsIn(Of T) (
source As T,
ParamArray list As T()
) As Boolean
public:
[ExtensionAttribute]
generic<typename T>
static bool kIsIn(
T source,
... array<T>^ list
)
[<ExtensionAttribute>]
static member kIsIn :
source : 'T *
list : 'T[] -> bool
Parameters
- source
- Type: T
The source. - list
- Type: T
The list.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:Koden.Utils.Extensions.ExtensionMethods.kIsIn``1(``0,``0[])"]
Return Value
Type:
Booleantrue if the specified variable is in the list; otherwise,
false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).
Exceptions
Examples
if(longVariable.IsIn(1,6,9,11))...
if(stringVariable.IsIn("One","Two","Three"))...
See Also