Context.GetString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| GetString(Int32) |
回傳應用程式套件預設字串表中的本地化字串。 |
| GetString(Int32, Object[]) |
回傳應用程式套件預設字串表中的本地化字串。 |
GetString(Int32)
回傳應用程式套件預設字串表中的本地化字串。
[Android.Runtime.Register("getString", "(I)Ljava/lang/String;", "")]
public string GetString(int resId);
[<Android.Runtime.Register("getString", "(I)Ljava/lang/String;", "")>]
member this.GetString : int -> string
參數
- resId
- Int32
字串的資源識別碼
傳回
與資源相關聯的字串資料,去除了樣式化的文字資訊。
- 屬性
備註
回傳應用程式套件預設字串表中的本地化字串。
Java 文件 android.content.Context.getString(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
GetString(Int32, Object[])
回傳應用程式套件預設字串表中的本地化字串。
[Android.Runtime.Register("getString", "(I[Ljava/lang/Object;)Ljava/lang/String;", "")]
public string GetString(int resId, params Java.Lang.Object[]? formatArgs);
[<Android.Runtime.Register("getString", "(I[Ljava/lang/Object;)Ljava/lang/String;", "")>]
member this.GetString : int * Java.Lang.Object[] -> string
參數
- resId
- Int32
字串的資源識別碼
- formatArgs
- Object[]
傳回
與資源相關聯的字串資料,去除了樣式化的文字資訊。
- 屬性
備註
Java 文件 android.content.Context.getString(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。