title: How get programmatically in C# if application has application manifest?
body: <p>I have seen how add manifest to a application (Console app, or Windows Form app) using this reference <a href="https://stackoverflow.com/questions/4383288/how-can-i-embed-an-application-manifest-into-an-application-using-vs2008">How can I embed an application manifest into an application using VS2008?</a></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/bb756929.aspx" rel="nofollow noreferrer">here</a> and <a href="http://blogs.msdn.com/b/cheller/archive/2006/08/24/718757.aspx" rel="nofollow noreferrer">here</a> for ways to embed my application's manifest files inside the PE</p>
  
  <p>You can add a manifest to your C# application by following these steps:</p>
  
  <ol>
  <li>Right-click on your project in the Solution Explorer</li>
  <li>Select "Add New Item" from the context menu.</li>
  <li>Choose "Application Manifest File" from the list of options in the dialog box that appears.</li>
  </ol>
  
  <p><strong><em>Now,</em></strong> </p>
  
  <p>I want <strong>get programmatically if an application has application manifest</strong> and for example get  level and uiAccess values from requestedExecutionLevel  node.</p>
  
  <pre><code>&lt;security&gt;
    &lt;applicationRequestMinimum&gt;
      &lt;PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" /&gt;
      &lt;defaultAssemblyRequest permissionSetReference="Custom" /&gt;
    &lt;/applicationRequestMinimum&gt;
    &lt;requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"&gt;
  
      &lt;requestedExecutionLevel level="requireAdministrator" uiAccess="false" /&gt;
  
    &lt;/requestedPrivileges&gt;
  &lt;/security&gt;
  </code></pre>
  
  <p>And two alternatives for that solution,</p>
  
  <p>1) Add the code in source code of application.</p>
  
  <p>2) Add the code in a common library that use some applications.</p>
  
  <p>Any final solution with full source code sample application ? </p>
  
  <p>IMHO, better samples for minimize learning curve are real applications with full source code and good patterns.</p>