System.Xml.XmlTextReader.Close C# (CSharp) Method

Close() public method

public Close ( ) : void
return void
        public override void Close()
        {
            _impl.Close();
        }

Usage Example

Example #1
0
 public static SvgDocument CreateDocumentFromFile(string filename)
 {
     Stream stream1 = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
     SvgDocument document1 = new SvgDocument();
     XmlTextReader reader1 = new XmlTextReader(stream1, XmlNodeType.Document, document1.XmlParserContext);
     try
     {
         reader1.XmlResolver = null;
         document1.PreserveWhitespace = true;
         document1.XmlResolver = null;
         document1.FilePath = filename;
         document1.Load(reader1);
         //document1.DealLast();
         reader1.Close();
         stream1.Close();
         document1.FileName = Path.GetFileNameWithoutExtension(filename);
         document1.Update = true;
         return document1;
     }
     catch (Exception exception1)
     {
         reader1.Close();
         stream1.Close();
         MessageBox.Show("���Ϸ��ĵ���" + exception1.Message);
     }
     return null;
 }
All Usage Examples Of System.Xml.XmlTextReader::Close