// Create a connection to the MySQL database MySqlConnection connection = new MySqlConnection("server=localhost;user=root;database=mydb;port=3306;password=mypassword"); // Open the connection connection.Open(); // Create a command to retrieve data from the customers table MySqlCommand command = new MySqlCommand("SELECT id,name,age FROM customers", connection); // Create a data reader to read the retrieved data MySqlDataReader reader = command.ExecuteReader(); // Loop through the columns and print the data type name of each column for (int i = 0; i < reader.FieldCount; i++) { string dataTypeName = reader.GetDataTypeName(i); Console.WriteLine("Column {0}: {1}", i, dataTypeName); } // Close the data reader and the connection reader.Close(); connection.Close();In this example, we connect to a MySQL database, retrieve data from the 'customers' table, and then use GetDataTypeName to print the data type of each column. The package library used in this example is the MySql.Data package.