using MySql.Data.MySqlClient; MySqlConnection conn = new MySqlConnection("server=hostname;user=username;password=password;database=database_name"); conn.Open();
using System.IO; using System.Data; using System.Text; using Microsoft.VisualBasic.FileIO; string path = "filepath.csv"; using (TextFieldParser parser = new TextFieldParser(path)) { parser.TextFieldType = FieldType.Delimited; parser.SetDelimiters(","); while (!parser.EndOfData) { string[] fields = parser.ReadFields(); // Do something with the fields } }
using System.Net.Mail; MailMessage mail = new MailMessage(); SmtpClient smtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress("[email protected]"); mail.To.Add("recipient_email_address"); mail.Subject = "Subject"; mail.Body = "Body"; smtpServer.Port = 587; smtpServer.Credentials = new System.Net.NetworkCredential("[email protected]", "your_email_password"); smtpServer.EnableSsl = true; smtpServer.Send(mail);Package Library: System.Net.Mail These examples show how MonoDevelop can be used to create applications that interact with databases, read and parse files, and send emails. Each example also requires different package libraries to function properly.