error cs0234-come from the example of a wrox book
Hello:
// C#Example01.cs
using System;
using System.Xml; //my marker: error cs0234 ÐÐ
using System.Text;
using System.IO;
namespace myApp
{
class mainClass
{
static void Main(string[] args)
{
FileStream myFile = new FileStream("test.xml", FileMode.Open);
XmlTextReader myReader = new XmlTextReader(myFile);
Console.Write("{0,-20}{1,-20}{2,-20}\n", "Type", "Name", "Value");
Console.Write("{0,-20}{1,-20}{2,-20}\n", "--------------------",
"--------------------", "--------------------");
while(myReader.Read())
Console.Write("{0,-20}{1,-20}{2,-20}\n",
myReader.NodeType.ToString(),
myReader.Name, myReader.Value);
myReader.Close();
myFile.Close();
}
}
}
//test.xml
<?xml version="1.0"?>
<customer>
<name>Alfred Q. Anybody</name>
<address>123 Anywhere Road</address>
<city>Somewheretown</city>
<state>PA</state>
<postalCode>29374</postalCode>
</customer>
>csc Example01.cs
error cs0234 ...
Example01.cs and test.xml is in the same fold.
why? please.
|