Skip to main content

InSet Method

Determines if a value (a number or string) equals to the specified set of values.

Definition​

Namespace: GHost.GSharp.PI.ACE
Assembly: GHost.GSharp.PI.ACE (in GHost.GSharp.PI.ACE.dll) Version: 1.2.44.3 (1.2.44.3)

C#

public static bool InSet(Object value, params Object[] values)

VB

Public Shared Function InSet (value As Object, ParamArray values As Object()) As Boolean

Parameters​

  Object
Input value (number or string) that needs to be checked if equals the specified set of values.
  Object[]
x1, x2, .., xN:Values (numeric or string) representing a set.

Return Value​

Boolean
True if the value is in set; False otherwise.

Remarks​

Example​

InSet(1, "1", 2, 3) returns True

InSet("3", 1, 2, 3) returns True

InSet("What?", "about", 1, 2) returns False

Exceptions​

ArgumentException

See Also​

Reference​

PIACEBIFunctions Class
GHost.GSharp.PI.ACE Namespace