I am trying to programically access Exchange Global Address List Contact property called Notes (喜欢这里 - > GAL Contact - Notes) . 我在Visual Studio(C#编程语言)应用程序中使用EWS Managed API . 我认为我的代码的逻辑是正确的...也许 nr.Contact.Notes 不是如何实现这一目标的正确选择 . 我将衷心感谢您的帮助 . Thx提前!
这是我的代码:
NameResolutionCollection nrCol = service.ResolveName("SMTP:", ResolveNameSearchLocation.DirectoryOnly, true);
foreach (NameResolution nr in nrCol)
{
if (nr.Contact.Notes == "mail_user")
{
Console.WriteLine("^^^^^^^DO SOMETHING^^^^^^^");
} // end of if (nr.Contact.Notes == "mail_user")
} // end of foreach
1 回答
只要您使用Exchange 2010 SP2或更高版本,就可以在Resolve名称中使用ContactDataShape重载,例如
它产生的XML就像