Description
Returns, as a decimal number, the value of the attribute attributeName of the object obj.
Syntax
dim i = GetDecimal(obj, attributeName) |
obj
the object, to read the attribute attributeName from
attributeName
the name of the attribute to be read from the object obj.
Code
<Extension()> _
Public Function GetDecimal(ByVal obj As IGenericAttrObj, ByVal attributeName As String) As Decimal
Dim value As Object
Dim found As Boolean
value = GetAttributeBase(obj, attributeName, found)
If found Then
Return CType(value, Decimal)
End If
Return Nothing
End Function
Examples
Return GetDecimal(obj, "duration")
See also
GetString, GetBoolean, GetDecimal, GetDate, GetXmlDocument, GetDataContent