ABAddressBook mybook = new ABAddressBook();
ABPerson[] allPeople = mybook.GetPeople();
foreach(ABPerson thisPerson in allPeople){
if(thisPerson.GetPhones() != null)
ABMultiValue<string> myMultiPhone = thisPerson.GetPhones();
}
}
我的应用程序中有以前的代码。使用 Monotouch build 1.4,我的应用程序出错了。如果没有与联系人关联的电话号码,则会收到 null 错误。有谁知道如何检查空值?