Click or drag to resize

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
Syntax
public static bool kIsIn<T>(
	this T source,
	params T[] list
)

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: Boolean
true 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
ExceptionCondition
ArgumentNullExceptionsource
Examples
if(longVariable.IsIn(1,6,9,11))... if(stringVariable.IsIn("One","Two","Three"))...
See Also