VB.NET

使用 Hex 函數返回數字的十六進制值。

Dim MyHex As String
MyHex = Hex(5) ' Returns 5.
MyHex = Hex(10) ' Returns A.
MyHex = Hex(459) ' Returns 1CB.

 

C#

string s= Convert.ToString(5, 16); //return 5
string s1 = Convert.ToString(10, 16); //return a
string s2 = Convert.ToString(459, 16); //return 1cb

arrow
arrow
    全站熱搜

    createps 發表在 痞客邦 留言(0) 人氣()