title: In .NET/C# test if process has administrative privileges
body: <p>Is there a canonical way to test to see if the process has administrative privileges on a machine?  </p>
  
  <p>I'm going to be starting a long running process, and much later in the process' lifetime it's going to attempt some things that require admin privileges.</p>
  
  <p>I'd like to be able to test up front if the process has those rights rather than later on.</p>