2014年2月10日

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)

导航