public void SetFloat(string keyName, float value) { DxBaseValue result; if (records.TryGetValue(keyName, out result)) { switch (result.Type) { case ValueType.VT_Array: ((DxArrayValue)result).Clear(); break; case ValueType.VT_Map: ((DxRecordValue)result).Clear(); break; default: result.AsFloat = value; return; } records[keyName] = new DxFloatValue(value); return; } records.Add(keyName, new DxFloatValue(value)); }
public void SetFloat(int idx, float value) { idx = ifNilInitArr2idx(idx); DxBaseValue v = arrayList[idx]; if (v != null && v.Type != ValueType.VT_Array && v.Type != ValueType.VT_Map) { arrayList[idx].AsFloat = value; return; } arrayList[idx] = new DxFloatValue(value); }