MultiSelect for WinForms
IsValid(Int32,Int32,Int32,Int32) メソッド
使用例 

C1.Win.Input.6 アセンブリ > C1.Framework 名前空間 > EnumHelper クラス > IsValid メソッド : IsValid(Int32,Int32,Int32,Int32) メソッド
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
An int indicate the max count of bit for test enum value
Check current value is a valid Enum type
シンタックス
'宣言
 
Public Overloads Shared Function IsValid( _
   ByVal enumValue As System.Integer, _
   ByVal minValueOfEnum As System.Integer, _
   ByVal maxValueOfEnum As System.Integer, _
   ByVal maxNumberOfBitsOn As System.Integer _
) As System.Boolean
public static System.bool IsValid( 
   System.int enumValue,
   System.int minValueOfEnum,
   System.int maxValueOfEnum,
   System.int maxNumberOfBitsOn
)

パラメータ

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
maxNumberOfBitsOn
An int indicate the max count of bit for test enum value

戻り値の型

A bool indicate the check result, if current value is a valid enum type, return true; otherwise false
解説
This method is applicable to check a Sequential defined flag-style enum type There is a enum value you want to test is 0x5f, in this enum type, the min value is 0x0f, and max value is 0x100, then this method called below can test its validation: EnumHelper.IsValid(0x5f, 0x0f, 0x100, 8); In this scenario, the four parameter is 8, because the max value is 0x100(Binary as 100000000), the max bits on value is 0xff (Binary as 11111111), it's the max number of bits on
使用例
There is a enum value you want to test is 0x5f, in this enum type, the min value is 0x0f, and max value is 0x100, then this method called below can test its validation: In this scenario, the four parameter is 8, because the max value is 0x100(Binary as 100000000), the max bits on value is 0xff (Binary as 11111111), it's the max number of bits on
EnumHelper.IsValid(0x5f, 0x0f, 0x100, 8);
参照

EnumHelper クラス
EnumHelper メンバ
オーバーロード一覧