ComponentOne MultiSelect for WinForms
C1.Framework Namespace / EnumHelper Class / IsValid Method / IsValid(Int32,Int32,Int32) Method
An int indivate the value you want to check
An int indicate the minimum value of your enum type
An int indicate the maximum value of your enum type

In This Topic
    IsValid(Int32,Int32,Int32) Method
    In This Topic
    Check current value is a valid Enum type
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function IsValid( _
       ByVal enumValue As Integer, _
       ByVal minValueOfEnum As Integer, _
       ByVal maxValueOfEnum As Integer _
    ) As Boolean
    public static bool IsValid( 
       int enumValue,
       int minValueOfEnum,
       int maxValueOfEnum
    )

    Parameters

    enumValue
    An int indivate the value you want to check
    minValueOfEnum
    An int indicate the minimum value of your enum type
    maxValueOfEnum
    An int indicate the maximum value of your enum type

    Return Value

    A bool indicate the check result, if current value is a valid enum type, return true; otherwise false
    Remarks
    This method is applicable to check a Sequential defined not-flag-style enum type
    See Also