上一页 1 ··· 3 4 5 6 7

2014年6月3日

Show a heart shaped

摘要: Windows Form application version:private void Form1_Load(object sender, EventArgs e) { this.BackColor = Color.Red; System.Drawing.Drawing2D.GraphicsPa... 阅读全文

posted @ 2014-06-03 13:42 小昊子 阅读(188) 评论(0) 推荐(0)

2014年5月4日

const, static and readonly

摘要: const, static and readonlyhttp://tutorials.csharp-online.net/const,_static_and_readonlyWithin a class, const, static and readonly members are special ... 阅读全文

posted @ 2014-05-04 18:06 小昊子 阅读(201) 评论(0) 推荐(0)

2014年4月16日

C# 中如何判断某个字符串是否为空的方法

摘要: C# 中如何判断某个字符串是否为空的方法 分享了三个方法来判断字符串是否为空引自:http://www.itokit.com/2012/0724/74618.html1. 三种常用的字符串判空串方法:Length法:bool isEmpty = (str.Length == 0);Empty法:bo... 阅读全文

posted @ 2014-04-16 15:01 小昊子 阅读(2059) 评论(0) 推荐(0)

2014年3月24日

获取某个类中所有方法并格式化输出

摘要: Get method listpublic List StretchAllMethodsThroughClassName(Type classType) { List allMethodsList = new List(); var allMethods = classType.GetMethods().ToList(); foreach (MethodInfo method in allMethods) { StringBuilder methodHeader ... 阅读全文

posted @ 2014-03-24 17:33 小昊子 阅读(242) 评论(0) 推荐(0)

2014年2月11日

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)

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)

2014年1月21日

解决outlook不能显示鼠标问题

摘要: 今天发现打开outlook2010后, 没有鼠标显示。解决方案:Control Panel -> Mouse Settings ->Pointer OptionsUncheck the "Hide the pointer while typing" 阅读全文

posted @ 2014-01-21 10:06 小昊子 阅读(2487) 评论(0) 推荐(0)

2013年5月4日

根据属性名称来改变XML节点值

摘要: 今天找到一个实例用来更新xml节点值,保留下来以供日后参考。XmlDocument doc = new XmlDocument(); doc.Load("books2.xml"); XPathNavigator nav = doc.CreateNavigator(); XPathNodeIterator iter = nav.Select("/bookstore/book[@name='autobiography2']"); txtBoxResult.Clear();while (iter.MoveNext()){ txtBoxResul 阅读全文

posted @ 2013-05-04 17:18 小昊子 阅读(194) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7

导航