ValuedNodeExtensionsAsSafeBoolean Method |
Tries to get the result of calling
AsBoolean() on a node throwing an error if the node is null.
Namespace:
VDS.RDF.Nodes
Assembly:
dotNetRDF (in dotNetRDF.dll) Version:
Syntax public static bool AsSafeBoolean(
this IValuedNode n
)
<ExtensionAttribute>
Public Shared Function AsSafeBoolean (
n As IValuedNode
) As Boolean
Parameters
- n
- Type: VDS.RDF.NodesIValuedNode
Node.
Return Value
Type:
Boolean[Missing <returns> documentation for "M:VDS.RDF.Nodes.ValuedNodeExtensions.AsSafeBoolean(VDS.RDF.Nodes.IValuedNode)"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IValuedNode. 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).
Exceptions Exception | Condition |
---|
RdfQueryException | Thrown if the input is null of the specific valued node cannot be cast to a boolean. |
See Also