我正在创建我的第一个Windows 8应用程序,我有一个问题。在Windows Phone 7中,我们可以在App.xaml.cs中定义所有全局变量,并通过App.all_performers进行访问,例如,默认数据类型可以正常工作,但如果我创建了一个由我自己创建的对象列表,比如事件(evento),该怎么办?
public static List<evento> eventos_near = new List<evento>();
我遇到了这个错误:
不一致的可访问性:字段类型 'System.Collections.Generic.List<UrbaneousTry2.evento>' 的可访问性低于字段 'UrbaneousTry2.App.eventos_near'
有人可以帮我吗? 我需要在应用程序的所有页面中使用列表和字典。
eventos_near
声明是字段,而evento
是类型。 - JaredPar