 | AttributeTableExtensionsGetFloatOrDefault Method |
Tries to get the float value with the specified key from the
attribute table, and returns the passed default value if the key
could not be found.
Namespace: Slash.Collections.AttributeTablesAssembly: Slash.Collections (in Slash.Collections.dll) Version: 1.0.6018.40177
Syntaxpublic static float GetFloatOrDefault(
this IAttributeTable attributeTable,
Object key,
float defaultValue
)
<ExtensionAttribute>
Public Shared Function GetFloatOrDefault (
attributeTable As IAttributeTable,
key As Object,
defaultValue As Single
) As Single
public:
[ExtensionAttribute]
static float GetFloatOrDefault(
IAttributeTable^ attributeTable,
Object^ key,
float defaultValue
)
[<ExtensionAttribute>]
static member GetFloatOrDefault :
attributeTable : IAttributeTable *
key : Object *
defaultValue : float32 -> float32
Parameters
- attributeTable
- Type: Slash.Collections.AttributeTablesIAttributeTable
Attribute table to get the value from.
- key
- Type: SystemObject
Key of the attribute to get.
- defaultValue
- Type: SystemSingle
Default value to return if the specified key could not be found.
Return Value
Type:
Single
Attribute value with the specified
key, if found,
and
defaultValue otherwise.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAttributeTable. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also