Keynotfound 异常
public int getLastUniqueID()
{
int lastID = 0;
IsolatedStorageSettings uc = IsolatedStorageSettings.ApplicationSettings;
List<sMedication> medicationList = (List<sMedication>)uc["medicationList"];
foreach (sMedication temp in medicationList) {
lastID = temp.UniqueID;
}
return lastID;
}
它发生在以下行:
List<sMedication> medicationList = (List<sMedication>)uc["medicationList"];