dotnet / dotnet/dotnet-api-docs
"InvokeSet should not be used"
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
InvokeSet is the only way I can see that allows you to set the value of an attribute that currently has no value. The Properties collection can only be used to update attributes that have a value. Even if you specify additional properties to return in the DirectorySearcher, the entry will not contain them and there is no way to set them.
There is a method "Add" but you cannot use it because the collection is a fixed size.
If there is a better way for this scenario, the documentation should specify how because InvokeSet is the only way I can see to do it...
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 1db88fe4-b886-0ba0-6d0a-08abc2e836ac
* Version Independent ID: 88779c68-f022-dcbc-d242-7e9c2be1bd07
* Content: [DirectoryEntry.InvokeSet(String, Object\[\]) Method (System.DirectoryServices)](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.directoryentry.invokeset?redirectedfrom=MSDN&view=netframework-4.7.2#System_DirectoryServices_DirectoryEntry_InvokeSet_System_String_System_Object___)
* Content Source: [xml/System.DirectoryServices/DirectoryEntry.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.DirectoryServices/DirectoryEntry.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.