コード例 #1
0
        /// <summary>
        /// Converts map element into a float or returns null if conversion is not possible.
        /// </summary>
        /// <param name="key">a key of element to get.</param>
        /// <returns>float value of the element or null if conversion is not supported.</returns>
        /// See <see cref="FloatConverter.ToNullableFloat(object)"/>
        public float?GetAsNullableFloat(string key)
        {
            var value = Get(key);

            return(FloatConverter.ToNullableFloat(value));
        }
コード例 #2
0
 /// <summary>
 /// Converts array element into a float or returns null if conversion is not possible.
 /// </summary>
 /// <param name="index">an index of element to get.</param>
 /// <returns>float value of element or null if conversion is not supported.</returns>
 /// See <see cref="FloatConverter.ToNullableFloat(object)"/>
 public float?GetAsNullableFloat(int index)
 {
     return(FloatConverter.ToNullableFloat(this[index]));
 }
コード例 #3
0
 public float?GetAsNullableFloat()
 {
     return(FloatConverter.ToNullableFloat(Value));
 }