Impersonation - how to use for entire solution.

Jun 16 2020 1:45 PM
I am using Winforms
  1. using (new Impersonation(domain, username, password))  
  2. {  
  3.     // do stuff  
  4.     // do whatever you want  
  5. }  
In my solution there are multiple projects are there i want to use the above code in multiple cs file/ projects . I don't want to create object multiple times instead i want to use same session. Is it possible to do ? if possible please share the skeleton code.