2
我MKAnnotation annotation
對象的定義有一個名爲IsEmergency
變量,但是當我運行此代碼:Xamarin C# - IMKAnnotation不包含「X」
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
SushiHangover來救援! –