Dear friend,

do you know how to convert Right function (in VB .NET) to C# ?

Tks,
hendy

==========

Public Function Format_Hex2(ByVal NUM As Integer) As String

        'Format Byte into two-digit Hex
        Format_Hex2 = Microsoft.VisualBasic.Right("00" & Hex(NUM), 2)

    End Function

String str = "00" & Hex(NUM);
Format_Hex2 = str.Substring(str.Length - 2);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.