구조체1 [C#] 구조체 변수, 구조체 배열 사용법 0. 폼 생성(listbox1만 생성) 1. 구조체 선언 2. 구조체 변수/배열 선언 3. 구조체 사용 및 활용 1. 구조체 선언 struct Diary { public string date; public string name; public int phoneNumber; public int cost; } 2. 구조체 변수/배열 선언 Diary myDiary = new Diary(); // 구조체 변수 선언 Diary[] arrDiary = new Diary[100]; // 구조체 배열 선언 3. 구조체 사용 및 활용 myDiary.date = "12월9일"; myDiary.name = "천재"; myDiary.phoneNumber = 123; myDiary.cost = 146134; listBox1.It.. 2021. 3. 21. 이전 1 다음