Class BooleanNode
Valued Node representing boolean values.
Implements
Inherited Members
Namespace: VDS.RDF.Nodes
Assembly: dotNetRdf.dll
Syntax
public class BooleanNode : LiteralNode, ILiteralNode, IEquatable<BaseLiteralNode>, IComparable<BaseLiteralNode>, IEquatable<LiteralNode>, IComparable<LiteralNode>, IValuedNode, INode, IComparable<INode>, IComparable<IBlankNode>, IComparable<IGraphLiteralNode>, IComparable<ILiteralNode>, IComparable<IUriNode>, IComparable<IVariableNode>, IComparable<IRefNode>, IComparable<ITripleNode>, IEquatable<INode>, IEquatable<IBlankNode>, IEquatable<IGraphLiteralNode>, IEquatable<ILiteralNode>, IEquatable<IUriNode>, IEquatable<IVariableNode>, IEquatable<IRefNode>, IEquatable<ITripleNode>
Constructors
| Improve this Doc View SourceBooleanNode(bool, string, bool)
Creates a new boolean valued node.
Declaration
public BooleanNode(bool value, string lexicalValue, bool normalizeValue = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | Boolean Value. |
string | lexicalValue | Lexical Value. |
System.Boolean | normalizeValue | Whether to normalize |
BooleanNode(bool)
Creates a new boolean valued node.
Declaration
public BooleanNode(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | Boolean Value. |
Properties
| Improve this Doc View SourceEffectiveType
Gets the URI of the datatype this valued node represents as a String.
Declaration
public string EffectiveType { get; }
Property Value
Type | Description |
---|---|
string |
NumericType
Gets the numeric type of the node.
Declaration
public SparqlNumericType NumericType { get; }
Property Value
Type | Description |
---|---|
SparqlNumericType |
Methods
| Improve this Doc View SourceAsBoolean()
Gets the boolean value.
Declaration
public bool AsBoolean()
Returns
Type | Description |
---|---|
System.Boolean |
AsDateTime()
Throws an error as booleans cannot be cast to date times.
Declaration
public DateTime AsDateTime()
Returns
Type | Description |
---|---|
System.DateTime |
AsDateTimeOffset()
Throws an error as booleans cannot be cast to date times.
Declaration
public DateTimeOffset AsDateTimeOffset()
Returns
Type | Description |
---|---|
System.DateTimeOffset |
AsDecimal()
Throws an error as booleans cannot be cast to decimals.
Declaration
public decimal AsDecimal()
Returns
Type | Description |
---|---|
decimal |
AsDouble()
Throws an error as booleans cannot be cast to doubles.
Declaration
public double AsDouble()
Returns
Type | Description |
---|---|
double |
AsFloat()
Throws an error as booleans cannot be cast to floats.
Declaration
public float AsFloat()
Returns
Type | Description |
---|---|
float |
AsInteger()
Throws an error as booleans cannot be cast to integers.
Declaration
public long AsInteger()
Returns
Type | Description |
---|---|
long |
AsString()
Gets the string value of the boolean.
Declaration
public string AsString()
Returns
Type | Description |
---|---|
string |
AsTimeSpan()
Throws an error as booleans cannot be cast to a time span.
Declaration
public TimeSpan AsTimeSpan()
Returns
Type | Description |
---|---|
System.TimeSpan |