小编Ema*_*nho的帖子

Metro App全局变量C#

我正在为Windows 8创建我的第一个应用程序,我有一个问题.在Windows Phone 7中,我们可以在App.xaml.cs中定义所有全局变量并通过App.all_performers访问例如,这适用于默认数据类型,但如果我创建一个由我创建的一个对象的列表,如evento

public static List<evento> eventos_near = new List<evento>(); 
Run Code Online (Sandbox Code Playgroud)

我有这个错误:

可访问性不一致:字段类型'System.Collections.Generic.List <UrbaneousTry2.evento>'的访问权限低于字段'UrbaneousTry2.App.eventos_near'

有人可以帮帮我吗?我需要在我的应用程序的所有页面中使用列表和词典

c# windows-8 windows-runtime winrt-xaml

3
推荐指数
1
解决办法
3846
查看次数

标签 统计

c# ×1

windows-8 ×1

windows-runtime ×1

winrt-xaml ×1