Be honest please 
DS is 3.7. At about 6 today, he asked to play with his marble run which I said yes to. He then started throwing the marbles around. I told him to stop. He threw one at the TV, I shouted "UH, NO! Don't throw things at the TV!" and asked him to come and talk to me. He ignored me, walking off with the box so he couldn't see me.
So, I warned him if he didn't stop and talk to me, I would take the marble run away and he wouldn't be able to play with it - did a count of 3 with this too. He continued to ignore me and walk away so I came to take the box, which he retaliated by opening out and spilling on the floor. Still, I gathered it all up and put it in a high cupboard.
He burst into tears at this and came into the living room and flopped down folornly on the chair I was using, I'm pretty sure deliberately, ie, he wanted attention from it/he wanted to annoy me - TBH, I'm not sure what the motivation was and this is where I think maybe I could/should have done something different.
Anyway, so I asked him to move as I was sitting there, he refused. I physically moved him off the chair and then he started hitting me. I told him I would take him to his bedroom if he kept hitting me, which just made him hit me more. So I've now removed him to his bedroom, which involved a manic shoving-behind-the-stairgate as I tried to close it. He can open it, so the purpose of this is to buy me a few seconds in order to run downstairs and close the bottom one (which he can't). TBH, I hate this putting in room thing and I'm not convinced it works that well, it definitely feels wrong to be holding him back with one arm while I effectively lock him in :(
However, after about five minutes of rattling the stairgate (he wasn't distressed during this time) he has just announced to me that he has an idea and he wants to be a bus driver on the stairs, and will I be a passenger. I told him I was busy at the moment and perhaps he could use some toys as passengers and he said "That's a great idea!" and has now run off and is crashing about upstairs, happily, not angrily.
So, I don't know, maybe it is okay? I can't shake the feeling that it feels wrong to me, however well it works.
Reading that back I can see that it was wrong to shout at the first incident, although I was irritated at him not listening in the first place, my idea of a "calm talk" probably seems pretty scary when you're 3 and someone has just shouted at you 