Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
' convert from decimal to hexadecimal
' if you pass the Digits argument, the result is truncated to that number of
' digits
'
' you should always specify Digits if passing negative values
Function Hex(ByVal value As Long, Optional ByVal digits As Short = -1) As String
' convert to base-16
Dim res As String = Convert.ToString(value, 16).ToUpper()
' truncate or extend the number
If digits > 0 Then
If digits < res.Length Then
' truncate the result
res = res.Substring(res.Length - digits)
ElseIf digits > res.Length Then
' we must extend the result to the left
If value >= 0 Then
' extend with zeroes if positive
res = res.PadLeft(digits, "0"c)
Else
' extend with "F"s if negative
res = res.PadLeft(digits, "F"c)
End If
End If
End If
' return to caller
Return res
End Function
📑 Evite Incurrir en Multas y Sanciones: Ofrecemos servicios de presentación de declaraciones de IVA (D104), alquileres (D125) y la anual de renta (D101)
🦉Prepración para examenes desde 6to hasta Bachillerato por madurez.
¡Obtenga su título!
🚀 FACTURATica.com la #1 sin Mensualidades ni Anualidades. Inscripción gratis en Hacienda.