语言

XmlReaderResourceParser.GetAttributeUnsignedIntValue 方法

定义

重载

名称 说明
GetAttributeUnsignedIntValue(Int32, Int32)

以无符号十进制整数的形式返回“index”处的属性值。

GetAttributeUnsignedIntValue(String, String, Int32)

以无符号十进制整数形式返回“attribute”的值。

GetAttributeUnsignedIntValue(Int32, Int32)

以无符号十进制整数的形式返回“index”处的属性值。

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。

实现

例外

属性值不是有效的无符号十进制整数。

注解

此 XML 读取器适配器仅支持无符号十进制值。 不支持十六进制前缀,例如 0x 和 #。

Android 参考。android.util.AttributeSet.getAttributeUnsignedIntValue

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

GetAttributeUnsignedIntValue(String, String, Int32)

以无符号十进制整数形式返回“attribute”的值。

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
attribute
String

要检索的属性。

defaultValue
Int32

如果未找到该属性,则返回的内容。

返回

转换后的值,如果属性不存在,则为 defaultValue。

实现

例外

属性值不是有效的无符号十进制整数。

注解

此 XML 读取器适配器仅支持无符号十进制值。 不支持十六进制前缀,例如 0x 和 #。

Android 参考。android.util.AttributeSet.getAttributeUnsignedIntValue

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于