为什么Windows Phone 7 API中不提供Enum.GetValues(),这是否意味着我通常应该避开Enums,而支持结构或其他机制。
最佳答案
Why is Enum.GetValues() not available in the Windows Phone 7 API
“为什么”是因为WP7基于“紧凑框架”-为了节省资源,紧凑框架并不包含完整框架中的每个方法-Enum.GetValues()是其中之一。
does this mean I should generally shy away from Enums in favor of structs or other mechanisms.
否-没有特殊原因。我建议您继续使用枚举,在其中找到最合适的编程解决方案。
关于windows-phone-7 - WP7中的Enum.GetValues,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5878895/