I would like to insert an array of strings into a table in PostgreSQL using Npgsql in C#. I have written the code below but am getting an InvalidCastexception.
eventcommand.Parameters.AddWithValue("@participants", NpgsqlDbType.Array).Value = participant.Text;
where participant is an textbox and eventcommand is an NpgsqlCommand.