C#: passing parameters to callbacks
问题 I have a fairly generic class (Record) that I have added a callback handler to, so I can do something like the following. record.Save(AfterSaveMethod); Which also returns the identity number of the record created. The issue I have now is that I have this nested save routine in a loop, and I need to use/pass the i variable! for (int i; i < count ;i++) { record.Save(AfterSaveMethod2) //but I need to pass i through as well } What do I do here? A\ rewrite the save method and include it in this