UtilEnumFindNearestEnumValueT(Int64, 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 Long,
direction As EnumFindDirection
) As T
Dim value As Long
Dim direction As EnumFindDirection
Dim returnValue As T
returnValue = UtilEnum.FindNearestEnumValue(value,
direction)
public:
generic<typename T>
static T FindNearestEnumValue(
long long value,
EnumFindDirection direction
)
static member FindNearestEnumValue :
value : int64 *
direction : EnumFindDirection -> 'T
No code example is currently available or this language may not be supported.
- value Int64
-
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 Long
Kbps128 = 128
Kbps192 = 192
Kbps256 = 256
Kbps320 = 320
End Enum
Dim nearestValue As Bitrate = FindNearestEnumValue(Of Bitrate)(192L, 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.