Imports System.Runtime.CompilerServices

Namespace Extensiones
    Public Module IntegerExtensions
        <Extension()> Function APalabras(Numero As Integer) As String
            Return NumerosAPalabras.ToCardinal(Numero)
        End Function

        <Extension()> Function EntreValores(Valor As Integer, RangoMenor As Integer, RangoMayor As Integer) As Boolean
            Return Valor >= RangoMenor And Valor <= RangoMayor
        End Function
        <Extension()> Function NothingA0(Valor As Integer?) As Integer
            Return If(Valor.HasValue, Valor, 0)
        End Function
    End Module
End Namespace
