C# 插入符号是怎样的^&引用;在使用PrincipalSearcher进行搜索时被处理?

C# 插入符号是怎样的^&引用;在使用PrincipalSearcher进行搜索时被处理?,c#,.net,active-directory,C#,.net,Active Directory,假设我在广告中有一个名为“John”的用户 当我尝试使用PrincipalSearcher搜索“^John”(带插入符号)时,我会得到“John”。我希望结果为空,因为广告中不存在“^John”用户 PrincipalContext context = new PrincipalContext(ContextType.Machine); UserPrincipal user = new UserPrincipal(context); user.SamAccountName = "^John";

假设我在广告中有一个名为“John”的用户

当我尝试使用PrincipalSearcher搜索“^John”(带插入符号)时,我会得到“John”。我希望结果为空,因为广告中不存在“^John”用户

PrincipalContext context = new PrincipalContext(ContextType.Machine);
UserPrincipal user = new UserPrincipal(context);
user.SamAccountName = "^John";
PrincipalSearcher search = new PrincipalSearcher(user);
UserPrincipal result = search.FindOne();

// result here would be "John" instead of null
现在我知道,在使用PrincipalContext进行搜索时,某些特殊字符的处理方式有所不同(星号*符号用作通配符),但我找不到PrincipalSearcher如何处理插入符号的文档

有人能告诉我在这种情况下如何处理插入符号吗