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