Operator explicit operator
explicit operator byte[](FieldValue)
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 operator bool(FieldValue)
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 |
|---|---|
| bool | 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 operator double(FieldValue)
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 operator int(FieldValue)
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 |
|---|---|
| int | 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 operator long(FieldValue)
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 |
|---|---|
| long | Value of the instance as long. |
Remarks
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If
value is null. |
| InvalidCastException | If value
is not LongValue. |
See Also
explicit operator string(FieldValue)
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 operator DateTime(FieldValue)
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 operator decimal(FieldValue)
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. |