C#ÖÐÓÃXmlDocument¶ÔÏó»ñÈ¡XMLÎļþÖеĽڵãÖµ
xmlÎļþ:
<?xml version="1.0" encoding="utf-8" ?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.98</price>
</book>
<bookstore>
<title lang="eng">Learning C#</title>
<price>55.23</price>
</bookstore>
<item name="1">µÚÒ»¸öitem</item>
<item name="2">
<item name="1">Õâ¸ö½áµã(1)</item>
<item name="2">Õâ¸ö½áµã(2)</item>
<book>
<title lang="cn">Learning C</title>
<price>60.95</price>
</book>
</item>
</bookstore>
XmlDocument xdoc = new XmlDocument();
xdoc.Load(Server.MapPath("books.xml"));
XmlNodeList xnl = xdoc.SelectNodes("/bookstore/book");
string nodeTempStr = "";
foreach (XmlNode node in xnl)
{
nodeTempStr = node.InnerText;
node
Ïà¹ØÎĵµ£º
C#×é¼þ¿ª·¢ÈËÔ±
ʲôʱºòʹÓÃoverride£¿Ê²Ã´Ê±ºòʹÓÃnew? ʲô½Ðshadowing?
ÖØÐ´¸¸ÀàµÄ·½·¨µÄʱºòÓÃoverrideÒÔʵÏÖ¶à̬£¬µ±ÄãÏëÆÁ±Î¸¸Àà³ÉÔ±µÄʱºòʹÓÃnew£¬shadowing»ù±¾¾ÍÊÇnewÓëoverrideÇø±ðµÈһЩ·½ÃæµÄÎÊÌ⣬¸öÈËÈÏΪŪÇåoverrideÓënew¾ÍûÓбØÒªÌØÒ⿼ÂÇshadowing¡£
½âÊÍvirtual¡¢sealed¡¢overrideºÍabstractµÄ ......
ÒÔǰÔÚ²©¿ÍÉÏ·¢¹ý£¬¾ÈËÌáÐÑDataSetÒÑ×Ô´ø¶ÁдXMLµÄ¹¦ÄÜ£¬ÓÚÊDZãɾÁË£¬
²»¹ýÔÚʵ¼ùÖиоõ·â×°Ò»²ãºó£¬Ê¹ÓÃÆðÀ´»¹ÊÇÂù·½±ãµÄ¡£¹ÊÔÙ´ÎÖØ·¢¡£
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.IO;
using System.Xml;
namespace XmlDesign
{
class XmlDatasetC ......
C#µÄToolTip£¨delphi½ÐHint£©»úÖÆ·Ç³£¹Ö£¬²»ÊÇÏñdelphiµÄÔª¼þÒ»Ñù£¬Ã¿¸öTControlÓÐÒ»¸öHintÊôÐÔ£¬C#ÓÐÒ»¸öToolTipÔª¼þ£¬µ±°ÑÕâ¸öÔª¼þ´Ó¹¤¾ßÏäÀµ½formÉϺó£¬Ñ¡ÖÐformÉϵÄÈκÎcontrolÔª¼þ£¬ÔÚÊôÐÔ´°Ì壨Object Inspector£©ÉϾͻá¶à³öÒ»¸öÊôÐÔ“toolTip1ÉϵÄToolTip”£¬Èç¹û¶àÀ¼¸¸ ......