XmlReaderResourceParser.GetAttributeUnsignedIntValue 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| GetAttributeUnsignedIntValue(Int32, Int32) |
解析屬性 at |
| GetAttributeUnsignedIntValue(String, String, Int32) |
解析 |
GetAttributeUnsignedIntValue(Int32, Int32)
解析屬性 at index 為無符號 32 位元十進位整數,並將結果轉換為有符號 32 位元整數。
public int GetAttributeUnsignedIntValue(int index, int defaultValue);
abstract member GetAttributeUnsignedIntValue : int * int -> int
override this.GetAttributeUnsignedIntValue : int * int -> int
參數
- index
- Int32
目標屬性的索引,0...count-1。
- defaultValue
- Int32
如果找不到該屬性該回傳什麼。
傳回
轉換後的值,或 defaultValue 屬性不存在時。
實作
例外狀況
屬性值並非無符號十進位整數格式。
屬性值大於最大無符號 32 位元整數。
備註
此 XML 讀取器介面卡僅支援無符號十進位值。 不支援 0x 和 # 等十六進位前綴。
Android 參考資料。android.util.AttributeSet.getAttributeUnsignedIntValue
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
GetAttributeUnsignedIntValue(String, String, Int32)
解析 attribute 為無符號的 32 位元十進位整數,並將結果轉換為有符號的 32 位元整數。
public int GetAttributeUnsignedIntValue(string? namespaceURI, string? attribute, int defaultValue);
abstract member GetAttributeUnsignedIntValue : string * string * int -> int
override this.GetAttributeUnsignedIntValue : string * string * int -> int
參數
- namespaceURI
- String
URI 用來查詢該屬性的命名空間。
- attribute
- String
要取回的屬性。
- defaultValue
- Int32
如果找不到該屬性該回傳什麼。
傳回
轉換後的值,或 defaultValue 屬性不存在時。
實作
例外狀況
屬性值並非無符號十進位整數格式。
屬性值大於最大無符號 32 位元整數。
備註
此 XML 讀取器介面卡僅支援無符號十進位值。 不支援 0x 和 # 等十六進位前綴。
Android 參考資料。android.util.AttributeSet.getAttributeUnsignedIntValue
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。