[Solved] How can I tell if my is being used by my program? [closed]


The code you provided does not show anything being done with myFriend, so no, myFriend is not being populated. You’re directly adding the Friend into the lstContacts control.

If you want to add it to myFriend as well, simply add

myFriend.Add(f); 

in the same function. Then, every time btnSave_Click is invoked, you’ll add a new element to both the user interface and to myFriend.

Since you can access lstContacts.Items anywhere, is there any reason you even need myFriend?

1

solved How can I tell if my is being used by my program? [closed]