I need some help. I am newcomer in C#.
The application is the PhoneBook. All the data serializable and stored in the List<>. Ithe main idea is to realize MVC pattern.
The question is how to implement events for deleting and editing contacts? Event for adding a contact is already exist and works.
To delete contact - inside the buttonDeleteContact_Click handler I need to get a selected object, than wrap it in DeletePersonEventArgs
and call the event (identical to AddClicked) DeleteClicked that will contail a code that delete a contact.
1. How to describe a type of Delete event ?
2. What should be in
internal class DeletePersonEventArgs : EventArgs
3. What should be inside controller's method that handles the DeleteClicked event?
The same issues for Update code.
void form_DeleteClicked(object sender, DeletePersonEventArgs e)
Could you please provide a code example for this events and help me to realize this logic.
Source code attachedPhoneBook v1.8.zip