He estado jugando con HttpWebRequest
s últimamente, y en los tutoriales que siempre hacen:C# new [delegate] no es necesario?
IAsyncResult result = request.BeginGetResponse(
new AsyncCallback(UpdateItem),state);
Pero new AsyncCallback
parece que no seria necesario. Si UpdateItem
tiene la firma correcta, entonces no parece haber un problema. Entonces, ¿por qué la gente lo incluye? ¿Hace algo?
Normalmente no uso 'nuevo DelegateType (...)', también me gustaría saber si eso hace algo. MSDN realmente no habla de ello aquí: http://msdn.microsoft.com/en-us/library/aa645739%28VS.71%29.aspx –
posible duplicado de [C#: diferencia entre '+ = un evento' y '+ = new EventHandler (anEvent)'] (http://stackoverflow.com/questions/550703/c-difference-between-anevent-and-new-eventhandleranevent) – nawfal