10 2009 档案
《Pragmatic Unit Testing in C#》-Part1
摘要:Classic AssertsAsserts are the fundamental building block for unit tests; the NUnit library provides a number of different forms of assert as static methods in the Assert class. AreEqualAssert.AreEqua... 阅读全文
posted @ 2009-10-27 14:03 SamZhang 阅读(271) 评论(0) 推荐(0)
格式化XML:输出有缩进效果的XML字符串
摘要:格式化XML:输出有缩进效果的XML字符串 1. 一般情况下使用以下代码即可将XML字符串重新格式化: private string FormatXml(string source) { StringBuilder sb = new StringBuilder(); XmlTextWriter writer = null; try { XmlDocument doc = new XmlDocum... 阅读全文
posted @ 2009-10-22 16:57 SamZhang 阅读(5912) 评论(0) 推荐(1)