经过 2 周的开发后,我第一次在 iphone 上尝试了我的应用程序,它在以下行崩溃(在模拟器中完美运行):
我有以下代码:
private readonly Dictionary<string, QueueItem queued = new Dictionary<string, QueueItem>();
private void Processqueue()
{
KeyValuePair<string, QueueItem> valuePair = queued.FirstOrDefault();
// Crashes with: System.TypeInitializationException has been thrown
// "And exception was thrown by the type initializer for PredicateOf`1"
}
private class QueueItem
{
public string Url { get; set; }
public Action<string> ImageLoaded { get; set; }
public bool Pending { get; set; }
}
希望有人知道该怎么做。
谢谢