... | ... | @@ -31,7 +31,7 @@ method를 가리킬 수 있는 type. |
|
|
}
|
|
|
```
|
|
|
* **Delegate chain**
|
|
|
delegate의 가장 강력한 속성은 여러 method들의 chain을 담을 수 있는 delegate이다. method들의 chain은 delegate가 invoke될 때 호출된다. 대부분 .NET language에서 delegate chain은 BCL library의 Delegateclass의 Combine() method에 의해 생성된다. 그러나 C#에서는 +operator가 overload해주기 때문에 delegate chain을 문법적으로 더 깔끔하게 생성할 수 있다. -operator는 delegate chain으로부터 해당 method를 제거한다.
|
|
|
delegate의 가장 강력한 속성은 여러 method들의 chain을 담을 수 있다는 것이다. method들의 chain은 delegate가 invoke될 때 호출된다. 대부분 .NET language에서 delegate chain은 BCL library의 Delegateclass의 Combine() method에 의해 생성된다. 그러나 C#에서는 +operator가 overload해주기 때문에 delegate chain을 문법적으로 더 깔끔하게 생성할 수 있다. -operator는 delegate chain으로부터 해당 method를 제거한다.
|
|
|
``` cs
|
|
|
using System;
|
|
|
|
... | ... | |