Notify me when events in Active Directory occur in C#
<p>I need to get notification when certain events occur in Active Directory using LDAP protocol. Events that should be triggered are:</p>

<ul>
<li>When a certain AD group is associated to a user.</li>
<li>And if a field (like phone number) has changed in AD user.</li>
</ul>

<p>I searched all internet but mostly solutions are based on the code on the end of this article:</p>

<ul>
<li><a href="https://stackoverflow.com/questions/2002606/registering-change-notification-with-active-directory-using-c-sharp">Registering change notification with Active Directory using C#</a> </li>
</ul>

<p>As mentioned in that article there are 3 ways to do it:</p>

<ul>
<li>Using USNChanged </li>
<li>Using the DirSync Control</li>
<li>And using that code on the end of the page.</li>
</ul>

<p>For first two options I found articles with examples on Microsoft's site, but all examples are in c++, and I need this in C#.</p>

<p>Other code samples that I found are incomplete and not understandable, so I can't use them appropriate.</p>

<p>Is there any solution, code sample etc that I can use similar to that code on the end of provided article? </p>

<p>Once again, I need this in C#</p>

<p>Thanks</p>