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

Application Config

|

1. 테스트 프로젝트를 실행한다.

2. 프로젝트를 만든후 [마우스 오른쪽 버튼  -> 추가 - > 구성요소 - > 응용프로그램 구성 파일] 추가한다.

3.

4. App.config 파일이 추가된 화면

5. <configuration> </configuration>   사이에 값들을 추가 시켜준다

6. 위의 설정된 값을 불러오는 코딩

7. 최종 결과

아직은 코딩으로  값을 설정하거나 수정하는것은 찾아보지 못했지만
언젠가는 유용하게 쓰일수 있을꺼같다.
Trackback 0 And Comment 0
prev | 1 | 2 | 3 | 4 | 5 ... | 20 | next