联系人 Pocket PC - WM 5.0 - C# .NET

发布于 2024-11-27 08:27:24 字数 65 浏览 3 评论 0原文

你好,我是在 mobile .net 中创建简单程序的新手。所以我的问题是, 我可以获取模拟器中存储的所有联系人吗?

Hello Im new in creating simple programs in mobile .net. So my question is,
is it possible for me to get all the contacts stored in an emulator?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

维持三分热 2024-12-04 08:27:24

是的,您可以使用 PocketOutlook API 查询联系人列表,您必须添加对 Microsoft.WindowsMo​​bile.PocketOutlook 程序集的引用,然后使用此代码片段

OutlookSession session = new OutlookSession();
ContactCollection contacts = session.Contacts.Items;
foreach (Contact contact in contacts)
{ 
   // Supposing that lstContacts is a ListBox on a form
   lstContacts.Items.Add(contact.FirstName + contact.LastName);
}

Yup you can query the contacts list using PocketOutlook API, you have to add a reference to Microsoft.WindowsMobile.PocketOutlook assembly then use this snippet of code

OutlookSession session = new OutlookSession();
ContactCollection contacts = session.Contacts.Items;
foreach (Contact contact in contacts)
{ 
   // Supposing that lstContacts is a ListBox on a form
   lstContacts.Items.Add(contact.FirstName + contact.LastName);
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文