[C#] abstract, interface, virtual (feat. override, new)
Β·
π Language/β C#
1. abstract, interface, virtual 1) abstract abstractλ νμ ν΄λμ€μκ² κ³΅ν΅μ μΈ μ μλ₯Ό μ 곡ν¨κ³Ό λμμ νμ ν΄λμ€μ μ¬μ©λ κΈ°λ₯μ κ°μ μ μΌλ‘ μ¬μ μν¨μ μλ€. abstract ν€μλλ‘ μ μν λ©μλλ μμ±μ λ³Έλ¬Έμ μ μν μ μλ€. μΌλ° λ©μλλ μμ±μ μ μν μ μλ€. μΈμ€ν΄μ€νν μ μλ€. abstract class Animal { public string name; public abstract void Speak(); public void Sleep() { Console.WriteLine("Zzzzz..."); } } class Dog : Animal { public Dog(string name) { this.name = name; } public over..