| 니앙팽이 - 객체지향(OOP) | 2-3 | Static (클래스 멤버)
·
CS/SW 공학
📕 2. 객체지향 개발📄 3. Static1). 클래스 변수 & 인스턴스 변수?클래스 내에서 멤버변수(클래스에 포함된 변수)는 선언된 위치에 따라 2가지로 구분됨.클래스 변수 : static variable인스턴스 변수 : instance varibale2). 예시public class Enemy { static int mEnemyCount = 0; 클래스 변수 string mEnemyName; 인스턴스 변수 public Enemy(string _enemyName){ mEnemyCount++; this.mEnemyName = _enemyName;} } ................................................ static void Main(string[] args) { Ene..