02 2014 档案

Send an email with format which is stored in a word document
摘要:1. Add a dll reference:Microsoft.Office.Interop.Word.dll2. Add the following usingsusing Word = Microsoft.Office.Interop.Word;using System.Net.Mail;using System.Text.RegularExpressions;3. Paste the following code into your application and call it.Note: Please modify the email info, and put a word fi 阅读全文

posted @ 2014-02-11 14:49 小昊子 阅读(227) 评论(0) 推荐(0)

How to send Email using C#
摘要:try { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress("your_email_address@gmail.com"); mail.To.Add("to_address"); mail.Subject = "Test Mai... 阅读全文

posted @ 2014-02-10 17:01 小昊子 阅读(264) 评论(0) 推荐(0)

验证一个字符串是否可以被转化为本地系统时间格式
摘要:今天有个测试需求要验证一个时间是否被显示为本地时间格式,翻了翻google,自己又做了些试验,终于找出来这么个方法。留下来以备日后查用。string dateNeedToParse = "02/10/2014"; DateTime myDate = DateTime.Now; bool compareResult = false; compareResult = DateTime.TryParseExact(dateNeedToParse, System.Globalization.DateTimeFormatInfo.Curr... 阅读全文

posted @ 2014-02-10 15:50 小昊子 阅读(181) 评论(0) 推荐(0)

导航