- 2025-07-28 1.0.7 Nueva función de ObtenerValorDesdeNombre
This commit is contained in:
@@ -836,4 +836,13 @@ Public Class DescripcionValor
|
||||
Return lista
|
||||
End Function
|
||||
|
||||
Public Function ObtenerValorDesdeNombre(Of TEnum As Structure)(nombre As String) As Integer?
|
||||
Dim resultado As TEnum
|
||||
If [Enum].TryParse(nombre, True, resultado) Then
|
||||
Return Convert.ToInt32(resultado)
|
||||
End If
|
||||
Return Nothing ' Devuelve Nothing si no hay coincidencia
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user