I am following a book which uses delegate keyword (as per my understanding) as name of the function to be encapsulated in delegate (the one which is called using delegate ob
If I understand your question correctly, you're confused with use of the keyword delegate
at different places.
public delegate void AppendChildData(T entityAggregate, object childEntityKeyValue);
The sort answer for the delegate
in the above is
A delegate is a type that defines a method signature. When you instantiate a delegate, you can associate its instance with any method with a compatible signature. You can invoke (or call) the method through the delegate instance. You can find more on MSDN
In the second case like below
protected override void BuildChildCallbacks()
{
this.childCallbacks.Add("allowances", delegate(Project project, object childKeyName)
{
this.AppendProjectAllowances(project);
});
}
delegate
is used to declare anonymous method
. In one sentence, it is method without name. More description is here MSDN
And last but not least, in future you should be more specific about your questions. :)