26.02.2015 Views

C#.Net Migration - A2Z Dotnet

C#.Net Migration - A2Z Dotnet

C#.Net Migration - A2Z Dotnet

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Registration<br />

• Create delegate object and store in caller to register<br />

– pass target object and method to delegate constructor<br />

caller<br />

target<br />

create<br />

void Run()<br />

{<br />

Student ann = new Student("Ann");<br />

Parent mom = new Parent();<br />

GradeChange g = new GradeChange(mom.Report);<br />

store<br />

}<br />

ann.Targets = g;<br />

...<br />

target<br />

object<br />

target<br />

method<br />

71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!