
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication8 { class Program { public class cons { public const int BOY = 8, MAN = BOY +12;} static void Main(string[] args) { Console.WriteLine("Boy : "+ cons.BOY); Console.WriteLine("Boy : "+ cons.MAN); } } } | cs |
'C# > C# Concept' 카테고리의 다른 글
[C#] 상속 (0) | 2018.04.05 |
---|---|
[C#] 오버로딩 (0) | 2018.04.05 |
[C#] ref와 out 키워드, (0) | 2018.03.29 |
[C#] 인터페이스 다중상속 (0) | 2018.03.22 |
[C#] 다형성 (polymorphism) (0) | 2018.03.22 |