KGy SOFT

ObjectExtensionsIn Method (Object, Object)

KGy SOFT Core Libraries Help

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0
Syntax

public static bool In(
	this Object item,
	params Object[] set
)

Parameters

item
Type: SystemObject
The item to search for in set.
set
Type: SystemObject
The set of items in which to search the specified item.

Return Value

Type: Boolean
 if item is among the elements of set; otherwise, .

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. 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).
Remarks

This method works similarly to the in operator in SQL and Pascal.

This overload uses Object.Equals method to compare the items.

See Also

Reference