这是声明save_g
public static IsolatedStorageSettings save_g = IsolatedStorageSettings.ApplicationSettings;
这里 cons.term[7] 是字符串类型
save_g[cons.term[7]] = (double)save_g[cons.term[7]] + 1;
上面的语句在模拟器上执行没有问题。但是当我在设备(Lumia 820)上运行它时会出错。
A first chance exception of type 'System.InvalidCastException' occurred in PhoneApp2.DLL
An exception of type 'System.InvalidCastException' occurred in PhoneApp2.DLL but was not handled in user code
而且我不知道出了什么问题。
请帮忙。