UtilEnumFindNearestEnumValueT(Int32, EnumFindDirection) Method
Gets the nearest value of an Enum.
Namespace: DevCase.Runtime.EnumsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
Public Shared Function FindNearestEnumValue(Of T) (
value As Integer,
direction As EnumFindDirection
) As T
Dim value As Integer
Dim direction As EnumFindDirection
Dim returnValue As T
returnValue = UtilEnum.FindNearestEnumValue(value,
direction)
public:
generic<typename T>
static T FindNearestEnumValue(
int value,
EnumFindDirection direction
)
static member FindNearestEnumValue :
value : int *
direction : EnumFindDirection -> 'T
No code example is currently available or this language may not be supported.
- value Int32
-
The existing value.
- direction EnumFindDirection
-
The find direction of the nearest value.
- T
-
The type of Enum.
T
The nearest value in the specified
Enum.
This is a code example.
No code example is currently available or this language may not be supported.
Enum Bitrate As Integer
Kbps128 = 128
Kbps192 = 192
Kbps256 = 256
Kbps320 = 320
End Enum
Dim nearestValue As Bitrate = FindNearestEnumValue(Of Bitrate)(192I, EnumFindDirection.GreaterOrEqual)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.