If your cluster does not support floating point, the value is converted to long bits. On reads, it's important to call GetFloat(String) to indicate that the long returned by the server should be converted back to a float. 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 float. Instead, use Bin(String, Object) which converts the float to a C# serialized blob.
float value = 22.7; Bin bin = new Bin("mybin", (Object) value);
This is slower and not portable to other languages, but the float type is preserved, so a float 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.6.0.0 (3.6.1)
Parameters
- name
- Type:
System String
bin name, current limit is 14 characters
- value
- Type:
System Single
bin value