In .NET 2.0, you will have to call the GetAccessControl method on the
Directory class or the DirectoryInfo class. This will return a
DirectorySecurity instance which you can use to modify the rights to the
directory for.
If you are using .NET 1.1 or before, then you will have to make the
calls to the appropriate APIs in the platform in order to do this.
Hope this helps.