Some time ago I created a small impersonator class .
Basically, you end your code to execute as another user, just inside a block using:
using ( new Impersonator( "myUsername", "myDomainname", "myPassword" ) )
{
...
<code that executes under the new context>
...
}
Worked well for my projects.