static void Main(string[] args) { MyNS.XinChao(); Xyz.MyNS.XinChao(); WriteLine('\n'); WriteLine(PI); WriteLine(Sin(PI / 4)); WriteLine('\n'); SanPham.Product product = new SanPham.Product(); product.Name = "IPad"; product.Price = 1000; product.Description = "This is IPad"; product.manufactory = new SanPham.Product.Manufactory(); product.manufactory.Name = "Apple"; WriteLine(product.GetInfo()); WriteLine('\n'); }
public void ParsingWithNSMgrSubclass () { XmlNamespaceManager nsMgr = new XmlNamespaceManager (new NameTable ()); nsMgr.AddNamespace ("foo", "bar"); XmlParserContext inputContext = new XmlParserContext (null, nsMgr, null, XmlSpace.None); XmlReader xr = XmlReader.Create (new StringReader ("<empty/>"), new XmlReaderSettings (), inputContext); XmlNamespaceManager aMgr = new MyNS (xr); XmlParserContext inputContext2 = new XmlParserContext(null, aMgr, null, XmlSpace.None); XmlReader xr2 = XmlReader.Create (new StringReader ("<foo:haha>namespace test</foo:haha>"), new XmlReaderSettings (), inputContext2); while (xr2.Read ()) {} }