19. ์ธํฐํ์ด์ค์์ ์๋ ํ๋กํผํฐ ์ฌ์ฉ๋ฒ
ยท
๐ป Programming Language/C#
namespace InterfacePropertyEx { // ์ธํฐํ์ด์ค ํ๋กํผํฐ interface IKeyValue { // ์ธํฐํ์ด์ค์์ ์๋ ํ๋กํผํฐ๋ C# ์ปดํ์ผ๋ฌ๊ฐ ์๋์ผ๋ก ๊ตฌํํด์ฃผ์ง ์๋๋ค. // ๋ฐ๋ผ์, ํด๋น ์ธํฐํ์ด์ค๋ฅผ ์์๋ฐ๋ ํด๋์ค์์ ๊ตฌํํด์ฃผ์ด์ผ ํ๋ค. string Key { get; set; } string Value { get; set; } } class KeyValue : IKeyValue { public string Key { get; set; } public string Value { get; set; } // ์ด๋ ๊ฒ ์์๋ฐ๋ ํด๋์ค์์ ์๋ํ๋กํผํฐ๋ฅผ ์ด์ฉํด์ ๊ตฌํํ ์ ์๋ค. // IKeyValue์ ์ธํฐํ์ด์ค๋ฅผ ๊ตฌํํด์ฃผ๊ณ ์์(์ฆ, ์ปดํ์ผ๋ฌ๊ฐ ์๋์ผ๋ก ํ๋กํผํฐ๋ฅผ ๊ตฌํํด์ค)..