Here we go again with another usefull piece of code. The following code is for determining if the user that runs your application belongs to a specific group. In the following example i check if the user belongs to group ‘Administrators’
The following code applies in Namespace System.Security.Principal
Ok that’s it. In VB .Net 2005 there is the My.User object which provides such functionality, so there is no need to do the above.
Happy coding 🙂