When my daughter had to share, intially it was tough. When kids came to the house to play, we put away toys she couldn't share (fear they would get ruined). At the park, when she played appropriately, she was allowed to play. When she was not playing appropriately (not sharing park toys, structures, or nicely), she was not allowed to play. I would remove her from the activity, explain how she was expected to behave, and have her sit on the bench for 2 minutes. After the third removal, we went home. At two, I only gave her two changes to play properly in the park, and that meant sharing.
Yes, we talked about how we were expected to behave/play ahead of time. She was able to show me children who were playing properly in the park and those who were not. The bigger struggle came when other care givers didn't expect their children to be nice. I was pleased to see her question this. Eventually, she would walk up to the adult and ask why they let the child "play mean in the park" (not share, push, throw sand, hit, etc.).
We rarely had to leave the park. Yes, I was disappointed when we had to leave because I was enjoying the outside time with other adults and appreciating the time to just be, but in the long run it was a good thing, as Martha would say.
Stephanie