You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
732 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Decorator
{
/*
* 카테고리: 구조 패턴
* 개요: 기존 객체의 구조를 그대로 둔 채, 부가적인 기능을 동적으로 추가함
* 일반적으로 상속등으로 서브클래스를 만들어 사용하는 것의 대안적인 방법으로,
* 너무 많은 서브클래스들이 만들어지는 경우 유용하게 사용될 수 있음
* 서브클래스는 컴파일 타임에 결정되지만, 데코레이터는 런타임에서 동적으로 추가확장 됨
*/
class Program
{
static void Main(string[] args)
{
Client.HowToTest();
Console.ReadKey();
}
}
}