Operator Explicit
Explicit(FieldValue to Byte[])
Defines an explicit conversion from FieldValue
instance to byte array.
Declaration
public static explicit operator byte[](FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| Byte[] | Value of the instance as byte[]. |
Remarks
This operation is the same as
AsByteArray. Valid only if this instance
is BinaryValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not BinaryValue. |
See Also
Explicit(FieldValue to Boolean)
Defines an explicit conversion from FieldValue
instance to boolean.
Declaration
public static explicit operator bool (FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| Boolean | Value of the instance as bool. |
Remarks
This operation is the same as
AsBoolean. Valid only if this instance
is BooleanValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not BooleanValue. |
See Also
Explicit(FieldValue to Double)
Defines an explicit conversion from FieldValue
instance to double precision floating point number.
Declaration
public static explicit operator double (FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| Double | Value of the instance as double. |
Remarks
This operation is the same as
AsDouble. Valid only if this instance
is DoubleValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not DoubleValue. |
See Also
Explicit(FieldValue to Int32)
Defines an explicit conversion from FieldValue
instance to 32-bit signed integer.
Declaration
public static explicit operator int (FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| Int32 | Value of the instance as int. |
Remarks
This operation is the same as
AsInt32. Valid only if this instance
is IntegerValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not IntegerValue. |
See Also
Explicit(FieldValue to Int64)
Defines an explicit conversion from FieldValue
instance to 64-bit signed integer.
Declaration
public static explicit operator long (FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| Int64 | Value of the instance as long. |
Remarks
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not LongValue. |
See Also
Explicit(FieldValue to String)
Defines an explicit conversion from FieldValue
instance to string.
Declaration
public static explicit operator string (FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| String | Value of the instance as string. |
Remarks
This operation is the same as
AsString. Valid only if this instance
is StringValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not StringValue. |
See Also
Explicit(FieldValue to DateTime)
Defines an explicit conversion from FieldValue
instance to date and time.
Declaration
public static explicit operator DateTime(FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| DateTime | Value of the instance as DateTime. |
Remarks
This operation is the same as
AsDateTime. Valid only if this instance
is TimestampValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not TimestampValue. |
See Also
Explicit(FieldValue to Decimal)
Defines an explicit conversion from FieldValue
instance to decimal number.
Declaration
public static explicit operator Decimal(FieldValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | A FieldValue instance to explicitly convert. |
Returns
| Type | Description |
|---|---|
| Decimal | Value of the instance as decimal. |
Remarks
This operation is the same as
AsDecimal. Valid only if this instance
is NumberValue.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not NumberValue. |