If your cluster does not support floating point, the value is converted to long bits. On reads, it's important to call GetDouble(String) to indicate that the long returned by the server should be converted back to a double. If the same bin name holds different types for different records, then this constructor should not be used because there is no way to know when reading if the long should be converted to a double. Instead, use Bin(String, Object) which converts the double to a C# serialized blob.
double value = 22.7; Bin bin = new Bin("mybin", (Object) value);
This is slower and not portable to other languages, but the double type is preserved, so a double will be returned without knowing if a conversion should be made.
For servers configured as "single-bin", enter a null or empty name.
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 3.3.0.0 (3.3.1)
Parameters
- name
- Type:
System String
bin name, current limit is 14 characters
- value
- Type:
System Double
bin value