[C#] Data Structure#06 | Dictionary
Sugar0810
Dictionary dic[Key] = Value, Key를 통하여 접근하여 그에 대응하는 Value를 불러올 수 있다. using System.Collections.Generic; using 선언 필수 얘도 클래스이기 때문에 Dictionary 타입의 객체를 생성하면 참조를 하게 된다는 의미가 된다. new를 사용하여 생성해야 함. 해시 테이블을 사용하기 때문에 매우 빠르다. 공간을 미리 많이 차지하고 있기 때문에 공간 면에선 비효율적일 수 있다. 메모리를 내주고 성능을 취한다. class Monster { public Monster(int id) { this.id = id; } public int id; } class Program { static void Main(string[] args) { Di..