views:

16

answers:

0

Is there a way to check (using c#) if given schema property of AD catalogue is writable? I didn't find anything in the ActiveDirectorySchemaProperty class and I don't know if it's possible to check that using basic DirectoryEntry class.

The problem is I don't like my part of code where every property modification operation is wrapped in try-catch block:

try
{
    de.Properties["someprop"].Value = "somevalue";
    de.CommitChanges();
}
catch 
{ inform user about error with that specific property }

I'd rather check it before writing, but how?