【发布时间】:2018-03-07 04:58:47
【问题描述】:
我的MKAnnotation annotation 对象有一个名为IsEmergency 的变量,但是当我运行这段代码时:
if (annotation.IsEmergency == "0")
{
//doStuff();
}
我收到一条错误消息,指出我的 annotation 对象不包含 IsEmergency 的定义。
在我提供的屏幕截图中,您可以看到我的对象包含此变量。
这是完整的错误:
Severity Code Description Project File Line Suppression State
Error CS1061 'IMKAnnotation' does not contain a definition for 'IsEmergency' and no extension method 'IsEmergency' accepting a first argument of type 'IMKAnnotation' could be found (are you missing a using directive or an assembly reference?) 270 Active
【问题讨论】:
标签: c# object xamarin definition