var store = await ContactStore.CreateOrOpenAsync();
StoredContact sc = new StoredContact(store);
IDictionary<string, object> values = await sc.GetPropertiesAsync();
values[KnownContactProperties.FamilyName] = "bbb";
values[KnownContactProperties.GivenName]= "worerrrrld";
//*************problem here**************
Nullable<DateTime> birth = DateTime.Now;
values[KnownContactProperties.Birthdate] = birth;
//values[KnownContactProperties.Birthdate] = DateTime.Now;
//values[KnownContactProperties.Birthdate] = "2010-05-10";
//it will cause exception by any way above.
//***************************************
await sc.SaveAsync();//Exception throw here :System.InvalidCastException
Windows phone8 API について
Windows.Phone.PersonalInformation
名前空間
Class については奇妙すぎますStoredContact
。
どんな体でも私を助けることができますか!これを設定するにはKnownContactProperties.Birthdate
?