public void AddWithValue(string key, string value, IStringConverter strConv) { var data = new MyStructData(); if (value == "") { data.myString = ""; data.type = MySqlDataType.VAR_STRING; } else if (value != null) { //replace some value if (strConv != null) { AddWithValue(key, strConv.WriteConv(value)); return; } else { data.myString = value.Replace("\'", "\\\'"); data.type = MySqlDataType.VAR_STRING; } } else { data.myString = null; data.type = MySqlDataType.NULL; } _values[key] = data; }