stringconnectionString="Server=127.0.0.1;Port=5432;Database=myDataBase;UserId=myUsername; Password=myPassword;"; NpgsqlConnectionconn=newNpgsqlConnection(connectionString); conn.Open(); C#连接PostgreSql需要的Npgsql.dll和Mono.Security.dll,Npgsql-2.2.3-net20.zip