Click here to Skip to main content
15,902,299 members
Home / Discussions / C#
   

C#

 
AnswerRe: Accessing a method in another file Pin
Andrei Ungureanu10-Sep-06 23:55
Andrei Ungureanu10-Sep-06 23:55 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 0:23
Yustme11-Sep-06 0:23 
AnswerRe: Accessing a method in another file Pin
Christian Graus11-Sep-06 0:10
protectorChristian Graus11-Sep-06 0:10 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 0:29
Yustme11-Sep-06 0:29 
GeneralRe: Accessing a method in another file Pin
Christian Graus11-Sep-06 0:54
protectorChristian Graus11-Sep-06 0:54 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 1:04
Yustme11-Sep-06 1:04 
GeneralRe: Accessing a method in another file Pin
Christian Graus11-Sep-06 1:12
protectorChristian Graus11-Sep-06 1:12 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 1:18
Yustme11-Sep-06 1:18 
Hi,

There is actually more code.

Complete class:

class XMLWriter
{
XmlWriterSettings settings = new XmlWriterSettings();
DateTime dateTimeNow = DateTime.Now;
XmlWriter writer = null;

public XMLWriter()
{
this.settings.Indent = true;
this.settings.IndentChars = "\t";
this.settings.OmitXmlDeclaration = true;
this.settings.NewLineOnAttributes = true;
this.settings.Encoding = Encoding.Default;
this.settings.ConformanceLevel = ConformanceLevel.Fragment;

this.writer = XmlWriter.Create("Testing.xml", settings);
this.writer.WriteStartElement("Information");
this.writer.WriteElementString("DateOfBuilding", dateTimeNow.ToShortDateString());
this.writer.WriteElementString("TimeOfBuilding", dateTimeNow.ToLongTimeString());
}

public void WritingToXMLDoc(string elementString, string writeToXMLDoc)
{
this.writer.WriteElementString(elementString, writeToXMLDoc);

this.writer.WriteEndElement();

this.writer.Flush();


if (this.writer != null)
this.writer.Close();
}
}

writer.Close(); is to stop writing and used for disposal.
GeneralRe: Accessing a method in another file Pin
mesmer11-Sep-06 1:42
mesmer11-Sep-06 1:42 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 1:53
Yustme11-Sep-06 1:53 
GeneralRe: Accessing a method in another file Pin
Christian Graus11-Sep-06 1:44
protectorChristian Graus11-Sep-06 1:44 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 1:51
Yustme11-Sep-06 1:51 
GeneralRe: Accessing a method in another file Pin
Christian Graus11-Sep-06 2:13
protectorChristian Graus11-Sep-06 2:13 
GeneralRe: Accessing a method in another file Pin
Yustme11-Sep-06 2:44
Yustme11-Sep-06 2:44 
Questionasynchronous sockets vs remoting Pin
saqib8210-Sep-06 23:47
saqib8210-Sep-06 23:47 
AnswerRe: asynchronous sockets vs remoting Pin
Andrei Ungureanu10-Sep-06 23:54
Andrei Ungureanu10-Sep-06 23:54 
AnswerRe: asynchronous sockets vs remoting Pin
Rob Philpott11-Sep-06 3:22
Rob Philpott11-Sep-06 3:22 
QuestionHow to retrieve data from DataGridView Pin
Rip Kirby10-Sep-06 23:08
Rip Kirby10-Sep-06 23:08 
QuestionVideo to Flash (.flv) Pin
AB777110-Sep-06 22:18
AB777110-Sep-06 22:18 
AnswerRe: Video to Flash (.flv) Pin
g00fyman10-Sep-06 22:52
g00fyman10-Sep-06 22:52 
GeneralRe: Video to Flash (.flv) Pin
AB777110-Sep-06 22:59
AB777110-Sep-06 22:59 
GeneralRe: Video to Flash (.flv) Pin
Arjun "Mjolnir" Bahree10-Sep-06 23:17
Arjun "Mjolnir" Bahree10-Sep-06 23:17 
GeneralRe: Video to Flash (.flv) Pin
AB777111-Sep-06 18:13
AB777111-Sep-06 18:13 
QuestionBulk Update. Pin
deepaks310-Sep-06 21:57
deepaks310-Sep-06 21:57 
AnswerRe: Bulk Update. Pin
Arjun "Mjolnir" Bahree10-Sep-06 22:16
Arjun "Mjolnir" Bahree10-Sep-06 22:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.