2

因此,对于我的 windows phone 7 应用程序,当我第一次调试应用程序时,我试图在他们“墓碑”我的应用程序后保存用户输入,但我在文本框中输入了一些数据并墓碑了我的应用程序后,我没有'没有得到 KeyNotFoundException。有人可以帮我解决这个问题吗?

4

1 回答 1

0

KeyNotFoundException means that you are trying to get some data from data collection by key, and that key/value pair does not exist:

http://msdn.microsoft.com/en-us/library/system.collections.generic.keynotfoundexception.aspx

Before trying to access the date using key, first check if that key even exists using ContainsKey method:

http://msdn.microsoft.com/en-us/library/kw5aaea4

于 2012-07-11T09:03:55.833 回答