9일차 메서드의 정의(4) 문자1개를 받아 아스키 코드로 출력

Console Programming/C# Console 2019. 10. 3. 13:27

문자 1개를 매개변수로 전달받아 아스키 코드로 출력 하는 메서드를 정의 하고 호출 하세요.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;
 
namespace Syntax24
{
    class App
    {
    
        public App()
        {
 
            Console.WriteLine("2019-09-30");
            Console.WriteLine();
 
            PrintCharToASCII('a');   
        }
 
        public void PrintCharToASCII(char c)
        {
            Console.WriteLine((int)c);
        }
    }
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

 

 

 

: