10 2012 档案

摘要:获取多维数组的维数和行数1 int[,,] a =new int[10,11,12]; 2 Console.WriteLine(a.Length); // 1320 3 Console.WriteLine(a.GetLength(0)); // 10 4 Console.WriteLine(a.GetLength(1)); // 11 5 Console.WriteLine(a.GetLength(2)); // 12多维数组的声明:1 string[,] book_arr = new string[,] { { "English", "101" ... 阅读全文
posted @ 2012-10-24 17:59 zp_Alex 阅读(607) 评论(0) 推荐(0)
摘要:1 private static XmlElement rootele; 2 private static XmlElement xmlele; 3 private static XmlNodeList nodelist; 4 private static XmlNode xmln; 5 private static void CreateNewXMLFile() 6 { 7 string[,] book_arr = new string[,] { { "English", "101... 阅读全文
posted @ 2012-10-24 17:55 zp_Alex 阅读(465) 评论(0) 推荐(0)
摘要:1).(删除某一个指定的节点): 1 nodelist = xmldoc.SelectSingleNode("employees").ChildNodes; 2 foreach (XmlNode xn in nodelist) 3 { 4 //remove node by node's attribute 5 xmlele = (XmlElement)xn; 6 if (xmlele.GetAttribute("id") == ... 阅读全文
posted @ 2012-10-23 16:23 zp_Alex 阅读(4941) 评论(0) 推荐(0)
摘要:已知XML文件如下(app.xml):<events> <title>Reading XML data!</title> <event> <date>sample date 1</date> <name>sample name 1</name> </event> <event> <date>sample date 2</date> <name>sample name 2</name> </event> <tes 阅读全文
posted @ 2012-10-19 22:39 zp_Alex 阅读(213) 评论(0) 推荐(0)
摘要:所有 XML 元素都须有关闭标签在 HTML,经常会看到没有关闭标签的元素:<p>This is a paragraph<p>This is another paragraph在 XML 中,省略关闭标签是非法的。所有元素都必须有关闭标签:<p>This is a paragraph</p><p>This is another paragraph</p> 注释:您也许已经注意到 XML 声明没有关闭标签。这不是错误。声明不属于XML本身的组成部分。它不是 XML 元素,也不需要关闭标签。XML 标签对大小写敏感XML 元素 阅读全文
posted @ 2012-10-19 13:31 zp_Alex 阅读(284) 评论(0) 推荐(0)
摘要:IntroductionXML is everywhere. As a result, many of us find the need to work with XML and traditional text editors don't cut it. Some editors provide decent formatting (like Notepad++), but they don't provide a mechanism to examine the underlying data in the XML programmatically.PowerShell m 阅读全文
posted @ 2012-10-19 13:22 zp_Alex 阅读(344) 评论(0) 推荐(0)
摘要:当我正准备记下学习Powershell函数的心得时,突然因为别的事情需要使用计算器。于是我就将就已经打开的Powershell控制台完全了计算。这个时间,我突然想起,忘了把Powersehll的运算符记录下来。Powersehll有哪些运算符 Powershell有哪些运行符?当然Google有答案,也许Baidu也有答案。不过我决定还是先问Powershell试试。所以我尝试了这么一条命令:PS F:\> help about_operator 嘿,蒙对了,这里果然有Powershell运算符的详细介绍。 Powershell支持运算符主要有这么几种类型: √ 算术运算符:用于进行.. 阅读全文
posted @ 2012-10-17 16:09 zp_Alex 阅读(1474) 评论(0) 推荐(0)