語言

Instrumentation.Context 屬性

定義

回傳此儀器套件的 Context。

public virtual Android.Content.Context? Context { [Android.Runtime.Register("getContext", "()Landroid/content/Context;", "GetGetContextHandler")] get; }
[<get: Android.Runtime.Register("getContext", "()Landroid/content/Context;", "GetGetContextHandler")>]
member this.Context : Android.Content.Context

屬性值

儀器的套件背景。

屬性

備註

回傳此儀器套件的 Context。 請注意,這通常與被安裝的應用程式的上下文不同,因為其執行的儀器程式碼通常與執行的應用程式的套件不同。 請參閱 getTargetContext() 以取得目標應用程式的 Context。

另請參閱:

Android 參考資料。android.app.Instrumentation.getContext

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於