C# Windows Phone-ScheduledTaskAgent更新实时互动程序计数
我有ScheduledTaskAgent,在这个代理中,当某些条件为真时,我想更新Live Tile中的计数。类似于以下代码:C# Windows Phone-ScheduledTaskAgent更新实时互动程序计数,c#,windows-phone-7,windows-phone-8,scheduled-tasks,live-tile,C#,Windows Phone 7,Windows Phone 8,Scheduled Tasks,Live Tile,我有ScheduledTaskAgent,在这个代理中,当某些条件为真时,我想更新Live Tile中的计数。类似于以下代码: ShellTile tile = ShellTile.ActiveTiles.First(); if ( tile != null) { StandardTileData data = new StandardTileData(); data.Title = "Title text here"; data.Count = 1; tile.
ShellTile tile = ShellTile.ActiveTiles.First();
if ( tile != null)
{
StandardTileData data = new StandardTileData();
data.Title = "Title text here";
data.Count = 1;
tile.Update(data);
}
但在第一行,我有一个例外:
'System.Collections.Generic.IEnumerable'
不包含“First”的定义且没有扩展方法
“First”接受类型为的第一个参数
'System.Collections.Generic.IEnumerable'
我该怎么解决这个异常呢?我必须导入一些库或以某种方式将ScheduledTaskAgent与app连接?问题已解决:缺少命名空间 Linq系统