且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 C# 中从 Active Directory 获取 System.__ComObject 值

更新时间:2022-12-04 21:53:01

事实上,变量 "compte" 是 DirectoryEntry 类型,我将其切换为 SearchResult,现在我可以使用以下方法访问它的值:

In fact, the variable "compte" is of type DirectoryEntry, I switched it to SearchResult, and now I can access it value with :

compte.Properties["ENTPersonDateNaissance"][0].ToString()

希望能帮到你.