• Ivy Seo

Read String array value from npgsql in C#

#NpgsqlDataReader


It's easy to find how to get String, Integer, Boolean type etc,

then how about string array type?

string[] IdArrayColumn = (string[])NpgsqlDataReader.GetValue(0);

other examples

string job_name = rdr.GetString(0); //For String

int id = rdr.GetInt32(1); //For Integer

bool active = rdr.GetBoolean(2); //For Boolean