쇠창살

|


내 소중한 사람 , 가족 을 보호 하기위핸 쇠창살.




타인의 안전을 위한 쇠창살
Trackback 0 And Comment 0

16진수 - > 10진수 변환

|

string
hexString = "C405";
int num = Int32.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
Console.WriteLine(num);

결과 : 50181
Trackback 0 And Comment 0

String to Byte Convert and Reverse

|


 

string tmp_str = "abcdefg";
byte[] tmp_bt;


            Console.WriteLine("Start string : " + tmp_str);

            // string -> byte[]
            tmp_bt = Encoding.ASCII.GetBytes(tmp_str);

            for (int i = 0; i < tmp_bt.Length; i++)
            {
                Console.Write(tmp_bt[i]);   
            }
            Console.WriteLine("");
            //result ==> 979899100101102103
                       
            //byte[] -> string
            string result_str = Encoding.ASCII.GetString(tmp_bt);
            Console.WriteLine("byte[]->string :" +result_str);

Trackback 0 And Comment 0
prev | 1 | 2 | 3 | 4 | 5 ... | 20 | next